Get QAudioBuffer from QMediaPlayer

I want to create an audio visualizer using QMediaPlayer

. I ran into this but QAudioProbe

didn’t allow me to install QMediaPlayer

as source. I believe this may not be supported by OSX.

I also found this one , but I'm not sure how to make it work with QMediaPlayer

as this example uses QIODevice

.

Is there any other way to get QAudioBuffer

from QMediaPlayer

without using it QAudioProbe

? If not, what other approach to getting data from QMediaPlayer

to create a visualizer?

+3


source to share


1 answer


As you can see here , the AV Foundation backend does not support audiozone or Stream source. You were unlucky. You need to decode audio with some other library like libmpg123 or libogg depending on the format. Then you can reproduce it using OpenAL .



+2


source







All Articles