Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.0
-
Windows 10
Description
in Wasapi it seems the BufferSize set in the AudioClient is 10 times the size which is passed to QAudioOutput::setBufferSize
after checking the source code (qtmultimedia/src/plugins/wasapi/qwasapiaudiooutput.cpp line 300-302), it seems there is a mistake in these lines
REFERENCE_TIME t = ((10000.0 * 10000 / nFmt.nSamplesPerSec * 1024) + 0.5);
if (m_bufferBytes)
t = m_currentFormat.durationForBytes(m_bufferBytes) * 100;
This parameter t is of type REFERENCE_TIME and is expressed in 100-nanosecond units, the durationForBytes is in microseconds, so the value should be multiplied by 10 instead of 100