<div dir="ltr">Hello,<div><br></div><div>I have the following QML that plays an audio file in an infinite loop.</div><div><br></div><blockquote style="margin:0 0 0 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"><br></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"><br></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"><br></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"><br></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/">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><span style="white-space:pre"><font face="arial, helvetica, sans-serif"><br></font></span></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><span style="white-space:pre"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><span style="white-space:pre"><font face="arial, helvetica, sans-serif">Thanks in advance,</font></span></div><div><span style="white-space:pre"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><span style="white-space:pre"><font face="arial, helvetica, sans-serif">Marc</font></span></div><div><br></div><div><div>





















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