Skip to content

CAudioOutputBuffer on Linux never read after Qt 6.10 update #406

@ltoenning

Description

@ltoenning

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)

Metadata

Metadata

Assignees

Labels

LinuxbugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions