Hi all,

I'm trying to play a simple audio file with phonon, but the sound doesn't work. The compilation process is ok, and the phonon linking is ok too.

Qt Code:
  1. MyClass::MyClass(QWidget *parent, Qt::WFlags flags)
  2. : QMainWindow(parent, flags)
  3. {
  4. ui.setupUi(this);
  5.  
  6. Phonon::MediaObject *mediaObject;
  7. Phonon::AudioOutput *audioOutput;
  8.  
  9. audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
  10. mediaObject = new Phonon::MediaObject(this);
  11. audioOutput->setVolume(0.5);
  12.  
  13. Phonon::createPath(mediaObject, audioOutput);
  14.  
  15. mediaObject->setCurrentSource(QString("vai.wav") );
  16. mediaObject->play();
  17.  
  18. }
To copy to clipboard, switch view to plain text mode 

My development environment is windows7 + VS2010 + QT 4.7.
There's last one thing: the path audio file is correct and it's in the same directory the generated executable.

Thanks all so much...