<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><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 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b> Thursday, April 18, 2019 at 8:45 AM<br/>
<b>From:</b> "Marc Van Daele" <marc.van.daele90@gmail.com><br/>
<b>To:</b> interest@qt-project.org<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: 0 0 0 40.0px;border: none;padding: 0.0px;">
<div>
<pre style="margin-top: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.0px;"> </pre>
</div>

<div>
<pre style="margin-top: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.0px;"> </pre>
</div>

<div>
<pre style="margin-top: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.0px;"><span style="color: rgb(192,192,192);">    </span>}</pre>
</div>

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

<div>
<pre style="margin-top: 0.0px;margin-bottom: 0.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: 0.0px;margin-bottom: 0.0px;">}</pre>

<pre style="margin-top: 0.0px;margin-bottom: 0.0px;"> </pre>
</div>
</blockquote>
<span style="white-space: pre;"><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;"><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;"><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;"><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;"><font face="arial, helvetica, sans-serif">Thanks in advance,</font></span></div>

<div> </div>

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

<div> </div>

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