[SailfishDevel] SoundEffect

Peter Pykäläinen peter.pykalainen at gmail.com
Thu Oct 9 20:30:44 UTC 2014


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.pykalainen at 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.neufing at 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20141009/1b7bc43c/attachment.html>


More information about the Devel mailing list