Ok I solved it! The WAV -file was in 32-bit. Converted it to be 16-bit and it works just fine.
Thank you all for your support. // Peter Pykäläinen On 9 October 2014 23:24, Peter Pykäläinen <peter.pykalai...@gmail.com> wrote: > Hi, > > here is the code: > > SoundEffect { > > id: shoot > > source: "../sounds/plane_shoot.wav" > > } > > > And sound should be played when a button is pressed. > > In the onPressed I have: shoot.play() > > Actually when I run my app I get: > > QSoundEffect(pulseaudio): Error decoding source > > Does this really mean that it can't decode the WAV file or it just can't > find it for some reason? > Attached is the sound file too. > > // Peter Pykäläinen > > On 9 October 2014 11:13, Michael Neufing <m.neuf...@yahoo.de> wrote: > >> That is very strange. >> Can you provide an example? It would be nice, if you could link the sound >> file, too. >> >> Audio-Element is not supposed to play effect-sounds. It is supposed (as >> the name states) to play audio (music, streams, etc). According to Qt-Docs, >> it is quite normal that it has a delay when playing sounds. >> >> >> You could also try to play the sound file on C++-side using QSound ( >> http://qt-project.org/doc/qt-5/qsound.html) - internally QMLs >> Sound-Element uses QSound, too. >> Maybe you'll get more information, why your file can not be processed. >> >> >> Mit freundlichen Grüßen, >> >> Michael Neufing >> > >
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org