Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[solved] QAudioInput 4.6.2 - witch chanel will be first?
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!!!
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.
Linux embedded, ARM 9,based on Debian.
About cast - I will try it without cast. On desktop it builded ok. And I should try to write wav thirdsite program, I think.
All, I localised the problem. I run arecord utilite few times, and - the same effect! It means - reason isn't in Qt . Sorry
No problem :)
Then, can you update the thread title prepending [solved] ? So other forum users may know an answer has been found :)
Happy coding !