Код, вызывающий сообщение:
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QFile file;
file.setFileName("/home/path/to/file/1.wav");
file.open(QIODevice::ReadOnly);
QByteArray ba = file.readAll();
QAudioFormat outputFormat;
outputFormat.setSampleRate(44100);
outputFormat.setChannelCount(1);
outputFormat.setSampleSize(16);
outputFormat.setCodec("audio/pcm");
outputFormat.setByteOrder(QAudioFormat::LittleEndian);
outputFormat.setSampleType(QAudioFormat::SignedInt);
QAudioOutput* player = new QAudioOutput(outputFormat);
QBuffer buffer(&ba);
buffer.open(QIODevice::ReadOnly);
player->start(&buffer);
QEventLoop audioLoop;
QObject::connect(player, SIGNAL(stateChanged(QAudio::State)), &audioLoop, SLOT(quit()));
do{
audioLoop.exec();
}while(player->state() == QAudio::ActiveState);
buffer.close();
delete player;
return 0;
}