[SailfishDevel] SoundEffect
Peter Pykäläinen
peter.pykalainen at gmail.com
Thu Oct 9 20:24:20 UTC 2014
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/ba599891/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plane_shoot.wav
Type: audio/x-wav
Size: 63808 bytes
Desc: not available
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20141009/ba599891/attachment-0001.wav>
More information about the Devel
mailing list