[solved] QAudioInput 4.6.2 - witch chanel will be first?
-
Hi, All!
I have written a program, it have got bytes from QAudioInput, analyse its and write to file whet it need. But I have a very starnge effect - first sample coming from right or left channel random (I use stereo). Who can help me?
@bytesPerSecond = settings.channels()*settings.frequency()*settings.sampleSize()/bitsInByte;outArray.resize(bytesPerSecond/partOfSecond); outArray.fill(0x00); audioInput = new QAudioInput(settings, reinterpret_cast<QObject*>(this)); /* qDebug() << "started with: \n\r Frequency:" << audioInput->format().frequency()\ << "\n\r N of chanels:" << audioInput->format().channels()\ << "\n\r SampleSize:" << audioInput->format().sampleSize()\ << "\n\r SampleType:" << audioInput->format().sampleType()\ << "\n\r ByteOrder:" << audioInput->format().byteOrder(); */
// debug info always the same!!!
audioInput->start( &buffer);
// audioInput->suspend();
@ -
Hi and welcome to devnet,
What OS are you using ?
On a side note, you don't need to cast this. In the other cases, you should use qobject_cast when dealing with QObject derived class.
-
No problem :)
Then, can you update the thread title prepending [solved] ? So other forum users may know an answer has been found :)
Happy coding !