<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QSoundEffect not working in Qt 6.4.2 windows 10]]></title><description><![CDATA[<p dir="auto">Hi Guys i would like to play a soundeffect with the QSoundEffect but when i tried in this way:</p>
<pre><code>QSoundEffect *soundEffect = new QSoundEffect();
soundEffect-&gt;setSource(QUrl("D:/QtProjectver200/Android_alarm/RES/alligator3.wav"));
soundEffect-&gt;setLoopCount(QSoundEffect::Infinite);
soundEffect-&gt;setVolume(50);
soundEffect-&gt;play();
</code></pre>
<p dir="auto">And the audio is not playing. The error what the Qt write out:<br />
QSoundEffect(qaudio): Error decoding source d:/QtProjectver200/Android_alarm/RES/alligator3.wav</p>
<p dir="auto">Thanks for your help!</p>
]]></description><link>https://forum.qt.io/topic/158201/qsoundeffect-not-working-in-qt-6-4-2-windows-10</link><generator>RSS for Node</generator><lastBuildDate>Sat, 24 Oct 2026 22:47:26 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/158201.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Aug 2024 13:34:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QSoundEffect not working in Qt 6.4.2 windows 10 on Tue, 13 Aug 2024 14:52:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kaguro">@<bdi>Kaguro</bdi></a></p>
<ul>
<li>
<p dir="auto">Yes, <code>setSource(QUrl::fromLocalFile(...))</code> looks like the correct way to specify a local file.</p>
</li>
<li>
<p dir="auto"><code>qt.multimedia.audiooutput: Failed to set up resampler</code>: Google for exactly that phrase.  <a href="https://stackoverflow.com/questions/74500509/failed-to-setup-resampler-when-starting-qaudiosink" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/74500509/failed-to-setup-resampler-when-starting-qaudiosink</a> tells you there is a Qt 6.4.x bug for exactly this, refers you to <a href="https://bugreports.qt.io/browse/QTBUG-108383" target="_blank" rel="noopener noreferrer nofollow ugc">https://bugreports.qt.io/browse/QTBUG-108383</a> and tells you what to do.  The Qt bug report tells you it was fixed in 6.4.3 but not 6.4.2.</p>
</li>
</ul>
]]></description><link>https://forum.qt.io/post/807248</link><guid isPermaLink="true">https://forum.qt.io/post/807248</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 13 Aug 2024 14:52:42 GMT</pubDate></item><item><title><![CDATA[Reply to QSoundEffect not working in Qt 6.4.2 windows 10 on Tue, 13 Aug 2024 14:47:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a></p>
<ul>
<li>Yes the QFile::exists() returns true. I tried this way now (the file is in the build folder):</li>
</ul>
<pre><code>    effect.setSource(QUrl::fromLocalFile("engine.wav"));
    effect.setLoopCount(QSoundEffect::Infinite);
    effect.setVolume(0.25f);
    effect.play();
</code></pre>
<p dir="auto">The new error is: qt.multimedia.audiooutput: Failed to set up resampler</p>
<ul>
<li>Necessary decoder? I don't know what it is, I didn't add anything other than the main QT. I gave to add some decoder?</li>
<li>Yes I tried with some different paths and i tried with .OGG file too.</li>
</ul>
]]></description><link>https://forum.qt.io/post/807244</link><guid isPermaLink="true">https://forum.qt.io/post/807244</guid><dc:creator><![CDATA[Kaguro]]></dc:creator><pubDate>Tue, 13 Aug 2024 14:47:35 GMT</pubDate></item><item><title><![CDATA[Reply to QSoundEffect not working in Qt 6.4.2 windows 10 on Tue, 13 Aug 2024 14:33:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kaguro">@<bdi>Kaguro</bdi></a></p>
<ul>
<li>Make sure that is the correct path: if it is not <code>QSoundEffect</code> still gives this (somewhat misleading) error message.  Use e.g. <code>QFile::exists()</code> to verify.</li>
<li>I don't know how this works on Windows, but do you have the necessary decoder for <code>.wav</code> files?</li>
<li>have you tried with another file in a different path?  Have you tried with something other than a <code>.wav</code> file?</li>
</ul>
]]></description><link>https://forum.qt.io/post/807240</link><guid isPermaLink="true">https://forum.qt.io/post/807240</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 13 Aug 2024 14:33:02 GMT</pubDate></item><item><title><![CDATA[Reply to QSoundEffect not working in Qt 6.4.2 windows 10 on Tue, 13 Aug 2024 13:44:58 GMT]]></title><description><![CDATA[<p dir="auto">I download the wav file from here:<br />
<a href="https://www.freesoundeffects.com/free-track/alligator3-89353/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.freesoundeffects.com/free-track/alligator3-89353/</a></p>
]]></description><link>https://forum.qt.io/post/807229</link><guid isPermaLink="true">https://forum.qt.io/post/807229</guid><dc:creator><![CDATA[Kaguro]]></dc:creator><pubDate>Tue, 13 Aug 2024 13:44:58 GMT</pubDate></item></channel></rss>