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

QAudioSink should provide a signal errorChanged()

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.4.2
    • Multimedia
    • MacOS (M1) 12.6

    • All

    Description

      The implementation of QAudioSink seems non-standard to me:

      • It has state() and stateChanged() which follow the norms of a readonly property, except that stateChanged() has an argument containing the current state. This is odd, but perhaps it is necessary given that states could change rapidly.
      • It has error() but there is no corresponding errorChanged(). This would be very useful and should be implemented in the same style as stateChanged().

      More importantly, in my app I have a class that instantiates QAudioSink and uses a QTimer to poll error(). I have witnessed significant underruns in my app (where the audio stutters or has pronounced gaps due to lengthy interframe audio processing) yet I have never been able to detect `error() == QAudio::UnderrunError` (running on MacOS (M1) 12.6). I would like to be able to use this error to gracefully degrade my audio processing so that the app performs well on slower devices.

      Attachments

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

        Activity

          People

            padubsky Pavel Dubsky
            paulmasri Paul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes