Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-84706

wrong size for QAudioOutput::setBufferSize

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.0
    • Multimedia
    • Windows 10
    • Windows

    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

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            artemiy Artem Dyomin
            filmars Philippe Castell
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes