QSoundEffect(qaudio): Error decoding source
-
wrote on 8 Apr 2015, 11:21 last edited by
I tried to play mp3/wma files using QSound, however I got "Error decoding source" runtime message (windows mediaplayer played files ok).
Only way I was able to play sounds, was to use QMediaPlayer do the playing.
Is there something odd related QSound (5.1/5.4) ?
-
I tried to play mp3/wma files using QSound, however I got "Error decoding source" runtime message (windows mediaplayer played files ok).
Only way I was able to play sounds, was to use QMediaPlayer do the playing.
Is there something odd related QSound (5.1/5.4) ?
wrote on 6 May 2015, 15:32 last edited byAre you sure your path is correct? If Qt can't find the file it gives the "error decoding source" message which is misleading.
Add files to your resource file:
- (If you haven't already created one go to File | New | Qt | Qt Resource File).
- Click Add existing files then select sound files you want
- Right click and copy path
- Paste path to play filename. e.g. QSound::play(":/lose.wav");