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

QAudioSink should provide a signal errorChanged()

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Won't Do
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.4.2
    • Multimedia
    • MacOS (M1) 12.6

    • All

      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.

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

            timblechmann tim blechmann
            paulmasri Paul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes