After updating to Qt 6.10, QIODevice::readData is never called within CAudioOutputBuffer.
This has likely something to do with this workaround, previously only applied to Windows.
|
#ifdef Q_OS_WIN |
|
qint64 CAudioOutputBuffer::bytesAvailable() const |
|
{ |
|
// Workaround to mimic the pre-Qt6 behavior. |
|
// With Qt6, the QAudioSink on Windows uses the bytesAvailable function to trigger |
|
// a call to readData() only when data is available. Other platforms still use a |
|
// pull procedure that automatically calls readData() afer a specific period. Until |
|
// a proper solution for the bytesAvailable() is implemented, this uses a fixed number. |
|
// readData() will handle it itself if actually no data is available. |
|
return 3840 + QIODevice::bytesAvailable(); |
|
} |
|
#endif |
When using this function also on Linux, AFV audio output works as expected.
Either:
- Investigate what exactly has changed in QMultimedia and how it is supposed to trigger a
readData() call.
- Also enable this function on Linux (quick and dirty fix)
After updating to Qt 6.10,
QIODevice::readDatais never called within CAudioOutputBuffer.This has likely something to do with this workaround, previously only applied to Windows.
pilotclient/src/core/afv/audio/output.cpp
Lines 30 to 41 in 5f982a0
When using this function also on Linux, AFV audio output works as expected.
Either:
readData()call.