0

Which is the best way to play QAudioBuffer of a format supported by audio card? Have I to create a QIODevice and convert it to raw data manually or is there a better way?

Andrea993
  • 663
  • 1
  • 10
  • 23

1 Answers1

0

A QAudioBuffer is very lightweight handle over a raw QByteArray. It is raw data already. You can think of it as a QByteArray with a few extra information fields attached to it.

You can write the QAudioBuffer::data() to a QIODevice returned by QAudioOutput::start().

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313