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?
Asked
Active
Viewed 908 times
0

Andrea993
- 663
- 1
- 10
- 23
1 Answers
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
-
The data is not raw, because it is an array of `StereoFrame` that is a struct – Andrea993 Feb 12 '16 at 15:02