Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QResource, Audio and SoundEffect problems
I've spent a whole week trying to figure out what exactly works and what doesn't in regards to audio and symbian and still nothing. I started with Phonon, writing a C++ music player and then found the QtMultimediaKit. I now use a loader and the audio element.
Music worked fine but SoundEffect didn't. For more details have a look over here: http://stackoverflow.com/questions/8440600/qml-soundeffect-not-working-audio-does
"Oh well", I said, "let's go with music only". I then moved all my QML, txt and audio files to a qrc, only to find out that now even music doesn't work. Whenever an audio is about to play, I get this:
qrc file :/audio/menu.ogg
If I try to play the music from my filesystem, as in, "file://path/to/audio.mp3", it works fine. But when I try to load it from qrc, it doesn't.
My setup is Windows 7, QtSDK 7.4.7, Symbian 1.1.
Thank you in advance!
danimo last edited by
Audio will not work with embedded resources. The reason being that Qt will invoke the local audio system which does not know about resource paths. You will need to put the files into the file system.
I see.. I used the local filesystem instead but SoundEffect still wasn't working. I worked around this by using Audio element for my background music (with fade in/out effects) and Phonon for the sound effects.
Thank you for verifying this.
grego last edited by
One thing that jumped out to me from your code is that by default Symbian does not support ogg.
But, I don't have SoundEffect working either on Symbian, still testing...
I hope that that is not true because I already sent my game for review with ogg files :/
It worked with the Audio element when testing on the simulator and I think it says in the documentation that ogg is supported.
Oh well, worst case scenario, I'll fail the review, change the files to mp3 and resubmit.
Thanks for the tip.