PDA

View Full Version : Get QAudioBuffer from QMediaPLayer



azazaz
17th February 2014, 22:55
Hi, I create stream player based on qmediaplayer and want add peak level meter to it.
i use functions from example recorder and make this:
http://gyazo.com/a45cb3f5dd5a072094d41463ad0b56c3.gif (the image is too large to insert it here, 183kb)


my result left on image, on right what i need

peak level update based on signal from QAudioProbe



QAudioProbe *probe = new QAudioProbe();
connect(probe, SIGNAL(audioBufferProbed(QAudioBuffer)),
this, SLOT(processBuffer(QAudioBuffer)));


i tried emit this signal but it not working;

how to emit this signal or get audiobuffer from player for no use signal and send buffer to processBuffer manualy?

ChrisW67
18th February 2014, 03:35
Have you called QAudioProbe::setSource() with your QMediaPlayer? (Almost exactly as in the documentation (http://qt-project.org/doc/qt-5.0/qtmultimedia/qaudioprobe.html#details))

azazaz
18th February 2014, 05:10
Have you called QAudioProbe::setSource() with your QMediaPlayer? (Almost exactly as in the documentation (http://qt-project.org/doc/qt-5.0/qtmultimedia/qaudioprobe.html#details))

i set source, me need update peak level FASTER