<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">Dne 26.12.2013 23:46, Kimmo Lindholm
napsal(a):<br>
</div>
<blockquote
cite="mid:F90A6B1B16626D4082FE8CBFCE5E47903273B00F@exchange.eke.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Is there a method to play default sounds within system,
I.e. sound specified as messagetone in audio/feedback
settings. ??</div>
<div> </div>
<div>I tried to access the wav files directly but… not luck…
Something like this didn’t work:</div>
<div> </div>
<div><font color="silver" face="Courier New" size="2"><span
style="font-size:10pt;"> <font color="purple">SoundEffect</font></span></font></div>
<div><font color="silver" face="Courier New" size="2"><span
style="font-size:10pt;"> <font color="black">{</font></span></font></div>
<div><font color="silver" face="Courier New" size="2"><span
style="font-size:10pt;"> <font color="maroon">id</font><font
color="black">:</font> <font color="black"><i>newMessage</i></font></span></font></div>
<div><font color="silver" face="Courier New" size="2"><span
style="font-size:10pt;"> <font color="maroon">source</font><font
color="black">:</font> <font color="green">"sound://theme/jolla-messagetone"</font></span></font></div>
<div><font color="silver" face="Courier New" size="2"><span
style="font-size:10pt;"> <font color="black">}</font></span></font></div>
<div><font face="Courier New" size="2"><span
style="font-size:10pt;"> </span></font></div>
<div>it gives: QSoundEffect(pulseaudio): Error decoding
source</div>
<div> </div>
<div>and using<font color="silver"> </font><font
color="maroon">source</font>:<font color="silver"> </font>"/usr/share/sounds/jolla-ringtones/stereo/jolla-messagetone.wav"</div>
<div>does not give any warning, it stops all audio, I can’t
play media or video either, phone doesn’t “ring”.</div>
<div>Have to reboot to get them back.</div>
<div> </div>
<div>-kimmo</div>
<div> </div>
<div> I read now this in other thread :<br>
</div>
</span></font></blockquote>
<br>
<pre wrap="">For Audio, use PulseAudio (or Qt5 Multimedia / SDL2 Audio if you use
these frameworks). Due to the resource policy, you might have to use
libaudioresource to request playback of audio, otherwise system policy
might prevent you from playing audio, and writing to the audio device
might block forever:
<a class="moz-txt-link-freetext" href="https://github.com/nemomobile/libaudioresource/">https://github.com/nemomobile/libaudioresource/</a>
HTH <span class="moz-smiley-s1" title=":)"></span>
Thomas</pre>
-kaacz<br>
<blockquote
cite="mid:F90A6B1B16626D4082FE8CBFCE5E47903273B00F@exchange.eke.local"
type="cite"><font face="Calibri" size="2"><span
style="font-size:11pt;">
</span></font>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
</blockquote>
<br>
</body>
</html>