<div dir="ltr"><div><div><div>Thank you for your help.<br><br>Which is weird is that I can play the music, but after it ends I can't play it again.<br><br></div>The status begins at 3 then 6 when play, and 2 when ending playing. When I press the status stays at 2.<br><br></div>I'll try to use SoundEffectin order to see if it solves anything, anyway making the song 4 or more seconds doesn't solve the problem, but thank you for the proposition :)<br><br>Best Regards,<br></div>Luis Da Costa<br><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-04 13:07 GMT+00:00 Juho Hämäläinen <span dir="ltr"><<a href="mailto:juho.hamalainen@tieto.com" target="_blank">juho.hamalainen@tieto.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On 04.02.2015 01:13, Luis Manuel Ramos Da Costa wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">
Hello Everyone,<br>
<br>
I've started developing for Jolla today, I am quite familiarez with the<br>
Qt/C++ language but not enough with the QML part.<br>
<br></span><span class="">
         Audio {<br>
             id      : whipSound<br>
             loops   : Audio.Infinite<br>
             source:"qrc:/sounds/resources/<u></u>sounds/whipSound.flac"<br>
         }<br>
     }<br>
}<br>
</span></blockquote>
<br>
For this particular case if you are going to play your sample only once, remove the "loops" part, with loops Audio.Infinite the sample will loop indefinitely until the playback is stopped.<br>
<br>
As to just playing short samples, SoundEffect is better suited to the task. SoundEffect unfortunately doesn't accept flac files as source, you'll need to use wav instead, but as the samples won't be long anyway it's not that bad. Using SoundEffect the above code part would be something like<br>
<br>
    SoundEffect {<br>
        id      : whipSound<br>
        source  : "qrc:/sounds/resources/sounds/<u></u>whipSound.wav"<span class=""><br>
    }<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
And I have a problem with this. The song plays one time by taping on the<br>
picture (the song is a .flac file with 1second long of audio), and after<br>
that if I press the picture again it simply doesn't play.<br>
</blockquote>
<br></span>
This sounds like a bug (which I couldn't reproduce when quickly testing (as you described it). I only saw that trying to play 1 second long flac with Audio always failed, raising the length to 4s and the sample played fine. Something is wrong anyway so I'll investigate more.<span class=""><font color="#888888"><br>
<br>
<br>
-- <br>
juho<br>
______________________________<u></u>_________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.<u></u>sailfishos.org</a><br>
</font></span></blockquote></div><br></div></div></div></div></div></div></div>