<div dir="ltr">Thanks for your reply!<div>Using two Audio items and overlapping the sounds works indeed fine (I had to tweak the sound a bit at the beginning and the end).</div><div>This looks like a bug to me and I've created <a href="https://bugreports.qt.io/browse/QTBUG-75314">https://bugreports.qt.io/browse/QTBUG-75314</a> for this</div><div><br></div><div>Marc</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 19 Apr 2019 at 21:30, Jason H <<a href="mailto:jhihn@gmx.com">jhihn@gmx.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Verdana;font-size:12px"><div>
<div>I'm guessing, but the audio hardware is shutting down? As a cheap hack, since it is "white noise", (it's not technically white noise) can you overlap two with a time offset so the audio hardware never shuts down?</div>

<div> </div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px;padding:10px 0px 10px 10px;border-left:2px solid rgb(195,217,229)">
<div style="margin:0px 0px 10px"><b>Sent:</b> Thursday, April 18, 2019 at 8:45 AM<br>
<b>From:</b> "Marc Van Daele" <<a href="mailto:marc.van.daele90@gmail.com" target="_blank">marc.van.daele90@gmail.com</a>><br>
<b>To:</b> <a href="mailto:interest@qt-project.org" target="_blank">interest@qt-project.org</a><br>
<b>Subject:</b> [Interest] QML Audio loops</div>

<div name="quoted-content">
<div>Hello,
<div> </div>

<div>I have the following QML that plays an audio file in an infinite loop.</div>

<div> </div>

<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">import</span><span style="color:rgb(192,192,192)"> </span>QtQuick<span style="color:rgb(192,192,192)"> </span>2.11</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">import</span><span style="color:rgb(192,192,192)"> </span>QtQuick.Window<span style="color:rgb(192,192,192)"> </span>2.11</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">import</span><span style="color:rgb(192,192,192)"> </span>QtMultimedia<span style="color:rgb(192,192,192)"> </span>5.8</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"> </pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,128)">Window</span><span style="color:rgb(192,192,192)"> </span>{</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">visible</span>:<span style="color:rgb(192,192,192)"> </span>true</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">width</span>:<span style="color:rgb(192,192,192)"> </span>640</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">height</span>:<span style="color:rgb(192,192,192)"> </span>480</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">title</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,85,175)">qsTr</span>(<span style="color:rgb(0,128,0)">"Hello</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">World"</span>)</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"> </pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">Audio</span><span style="color:rgb(192,192,192)"> </span>{</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,0,0)">id</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">noiseId</span></pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,0,0)">loops</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">Audio</span>.Infinite</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,0,0)">source</span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"qrc:/448213__florianreichelt__white-noise.wav"</span></pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,0,0)">onStatusChanged</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,85,175)">console</span>.log(<span style="color:rgb(0,128,0)">"status</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span>+<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">status</span>)</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,0,0)">onError</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,85,175)">console</span>.log(<span style="color:rgb(0,128,0)">"error</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span>+<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(41,133,199)">error</span><span style="color:rgb(192,192,192)"> </span>+<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span>+<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(41,133,199)">errorString</span>)</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,0,0)">onPlaybackStateChanged</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(0,85,175)">console</span>.log(<span style="color:rgb(0,128,0)">"playbackstate</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span>+<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">playbackState</span>)</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>}</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"> </pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">Component.onCompleted</span>:<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic">noiseId</span>.play()</pre>
</div>

<div>
<pre style="margin-top:0px;margin-bottom:0px">}</pre>

<pre style="margin-top:0px;margin-bottom:0px"> </pre>
</div>
</blockquote>
<span style="white-space:pre-wrap"><font face="arial, helvetica, sans-serif">I used the noise file from <a href="https://freesound.org/people/florianreichelt/sounds/448213/" target="_blank">here</a></font></span>

<div><span style="white-space:pre-wrap"><font face="arial, helvetica, sans-serif">Unfortunately, after every loop, I hear a clear short hiccup. </font></span></div>

<div><span style="white-space:pre-wrap"><font face="arial, helvetica, sans-serif">Any advice on how to avoid these hiccups?</font></span></div>

<div> </div>

<div><span style="white-space:pre-wrap"><font face="arial, helvetica, sans-serif">I'm using Qt5.11.2 on Ubuntu 16.04</font></span></div>

<div> </div>

<div><span style="white-space:pre-wrap"><font face="arial, helvetica, sans-serif">Thanks in advance,</font></span></div>

<div> </div>

<div><span style="white-space:pre-wrap"><font face="arial, helvetica, sans-serif">Marc</font></span></div>

<div> </div>

<div>
<div>
<pre style="margin-top:0px;margin-bottom:0px"> </pre>
</div>
</div>
</div>
_______________________________________________ Interest mailing list <a href="mailto:Interest@qt-project.org" target="_blank">Interest@qt-project.org</a> <a href="https://lists.qt-project.org/listinfo/interest" target="_blank">https://lists.qt-project.org/listinfo/interest</a></div>
</div>
</div>
</div></div></div>
</blockquote></div>