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

wrong size for QAudioOutput::setBufferSize

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.0
    • Fix Version/s: None
    • Component/s: Multimedia
    • Labels:
      None
    • Environment:
      Windows 10
    • Platform/s:
      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

            Assignee:
            valentyn.doroshchuk Valentyn Doroshchuk
            Reporter:
            filmars Philippe Castell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes