[Qt-creator] SoundEffect not working

Harri Pasanen harri at mpaja.com
Mon May 12 11:29:54 CEST 2014


Might be a deployment issue, are you sure .wav is in your package?

Putting it into a resource file is probably the easiest option.

Harri


On Thu, May 8, 2014 at 6:30 PM, Andres Piccininno <andypizu at hotmail.com>wrote:

>  Hello, I am currently developing an application for Android devices
> with Qt. The problem I am dealing with is that the SoundEffect Object
> is not working, is not performing any kind of sound when it has to when
> I play the app on a real device. However, when I play the app on the Qt
> emulator the sound does work. Why so? Could you please tell me what
> do I need exactly to use the SoundEffect, I mean if I need to specify
> something
> in the Android Manifest or something?
> The code I have in my Qml file is something like this one:
>
> import QtQuick 2.0
> ...
> Item {
>  id: newGameScreen
>  width:640
>  height:360
>  signal startButtonClicked
> ......
>  SoundEffect {
>  id: sound_home
>  source: "content/sound_home.wav"
>  }
>  Timer {
>  interval: 1
>  running: true
>  onTriggered: sound_home.play()
>  }
>  }
> ....
>
> Thanks in advance. Andrés
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20140512/5cec5c9e/attachment.html>


More information about the Qt-creator mailing list