Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4.2
-
MacOS (M1) 12.6
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.