Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.0.1
-
None
-
Linux goldorak 3.5.0-25-generic #39-Ubuntu SMP Mon Feb 25 18:26:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
kubuntu 12.10 + KDE-4.10.1 + Alsa
qt-opensource-5.0.1-x86
Description
There is no sound output in any mumtimedia examples provided when it comes to sound (e.g.: the spectrum demo)
On another hand video plays correctly with sound.
This example does not works neither :
QAudioOutput_test
QVector <double> * soundData = SoundGenerator::getSound(); soundBuffer->open(QIODevice::ReadWrite); QDataStream writeStream(soundBuffer); foreach(double d, *soundData) { char value = d * (2 << 7); // qDebug() << "Value : " << (short int)value; writeStream << value; } QAudioFormat format; // Set up the format, eg. format.setSampleRate(SoundGenerator::getAudioSampleRate()); format.setChannelCount(1); format.setSampleSize(8); format.setCodec("audio/pcm"); format.setByteOrder(QAudioFormat::LittleEndian); format.setSampleType(QAudioFormat::SignedInt); QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice()); audio = new QAudioOutput(format, this); if (audio->error() != QAudio::NoError) { qDebug() << "Problem playing sound"; } connect(audio, SIGNAL(stateChanged(QAudio::State)), this, SLOT(aboutToFinish(QAudio::State))); audio->start(soundBuffer);