I want to get a RTP audio stream coming from an Axis Camera and then play it back in real time in my Qt project.
I'm using Live555 in order to manage the audio stream and decode it with FFMPEG. When I decode a packet I emit a signal that is managed inside a slot of my widget with:
ap.ioDevice->write((const char*)ptrArr, frameSize);
The problem is that when I listen, my voice but a little bit metallic!
I set these parameters for the QAudioOutput
:
format.setFrequency(22050);
format.setChannels(1);
format.setSampleSize(16);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
format.setSampleType(QAudioFormat::UnSignedInt);
What's wrong?
Thank you to all.
As I said in a comment I'm able to obtain an enough clear playback with 8000Hz and 2 channels.
Now I'm trying to solve other problems and than I'll try to improve audio quality for example with Phonon.