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

Audio QIODevice readyRead signal not firing at correct interval with 48000Hz

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.2.0 Beta1
    • Multimedia
    • None
    • OS X 10.9

    Description

      Trying to capture audio with a USB headset. The audio format we're using is as follows.

      QAudioFormat(48000Hz, 16bit, channelCount=2, sampleType=SignedInt, byteOrder=LittleEndian, codec="audio/pcm")

      If I set the input buffer size to 1024 (and verify that it is set as such by getting bufferSize() after start() has been called - the readyRead() signal for the associated QIODevice doesn't actually fire until the QAudioInput instance reports its bytesReady() as 1112.

      We're a real-time audio application with client and server components, so not getting the callback with the right amount of data on the right interval throws off communication with the server.

      This appears to be hardware dependent. We have another USB adapter that when plugged in calls readyRead() with 1024 bytes each time. For now since our Audio is on a separate thread anyhow I may run my own while loop with a sleep to see if that gives me the right amount of data in the buffer.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            birarda Stephen Birarda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes