Thanks for reading my post .

I am developing a small project to process audio. The program allows both read an .mp3 file or record sound from the microphone .

While playing or recording shows the user the energy of the signal and the spectrum.
When I want to record sound I use QAudioRecorder and everything works properly. The problem is that if I want to read an .mp3 file does not work.I have a problem connecting QMediaPlayer and QAudioProbe.
Qt Code:
  1. mediaPlayer=new QMediaPlayer(this);
  2. audioProbe = new QAudioProbe(this);
  3.  
  4. if (audioProbe->setSource(mediaPlayer)) {
  5. // Probing succeeded, audioProbe->isValid() should be true.
  6. connect(audioProbe, SIGNAL(audioBufferProbed(QAudioBuffer)),
  7. this, SLOT(calculateLevel(QAudioBuffer)));
  8. cout << "All work correctly" << endl;
  9. }else{
  10. cout << "Some problems" << endl;
  11. }
  12. mediaPlayer->setMedia(fileSelected);
  13. mediaPlayer->setVolume(50);
  14. mediaPlayer->play();
To copy to clipboard, switch view to plain text mode 
The sound is played correctly but I fail to connect with QAudioProbe . How I can connect it? Thanks.