3

I want to build an audio visualizer using QMediaPlayer. I came across this but QAudioProbe would not allow me to set QMediaPlayer as its source. I believe it may not be supported on OSX.

I have also found this but I'm not sure how to make it work with QMediaPlayer as that example uses a QIODevice.

Is there another way to getting QAudioBuffer from a QMediaPlayer without using QAudioProbe? If not, what is another approach to getting data from QMediaPlayer in order to build a visualizer?

Community
  • 1
  • 1
aanrv
  • 2,159
  • 5
  • 25
  • 37

1 Answers1

2

As you can see here, AV Foundation backend has support neither for Audio probe, nor for Stream source. You are out of luck. You need to decode audio with some other library, for example libmpg123 or libogg, depending on the format. Then you can play it with OpenAL.

psyched
  • 1,859
  • 1
  • 21
  • 28