Hello,
I'm writing an application for N9 that needs to play a sound saved as a .wav file, using QMediaPlayer. I thought I'd add the sound file to the application resources for easy packaging, but when I do that, the application crashes when the sound is attempted to be played (no sound is heard). If the file is saved in a directory and referenced to as a local file, everything works.
That is, if I use
m_player->setMedia(QUrl("qrc:/airhorn.wav"));
I get the segfault, whereas using
m_player->setMedia(QUrl::fromLocalFile("/home/developer/airhorn.wav"));
I don't. I couldn't find anything useful with the debugger.
Has anybody experienced similar problems? Should the resource-based approach work at all?

Reply With Quote

