<?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[Qmediaplayer still hates functioning]]></title><description><![CDATA[<p dir="auto">Hi all, i wrote the following code and there are no errors</p>
<p dir="auto">#include "mainwindow.h"<br />
#include &lt;QApplication&gt;<br />
#include &lt;QMediaPlayer&gt;<br />
#include &lt;QAudioOutput&gt;<br />
#include &lt;QUrl&gt;<br />
#include &lt;QAudio&gt;</p>
<p dir="auto">int main(int argc, char *argv[])<br />
{<br />
QApplication a(argc, argv);</p>
<pre><code>MainWindow w;


QMediaPlayer* player = new QMediaPlayer;
player-&gt;setSource(QUrl::fromLocalFile("/home/vboxuser/go.mp3"));


QAudioOutput* audioOutput = new QAudioOutput();
audioOutput-&gt;setVolume(0.5); // set the volume to 50%
player-&gt;play();

w.show();
return a.exec();
</code></pre>
<p dir="auto">}<br />
but i hear no output when i run the program, this is the file location <img src="https://ddgobkiprc33d.cloudfront.net/f774083d-4f81-4a0d-8482-95533cad3841.png" alt="a0e2331f-a8e9-4359-8a8a-f9030867ffb4-image.png" class=" img-fluid img-markdown" />   This is running on Debian, latest release, any ideas?</p>
]]></description><link>https://forum.qt.io/topic/142421/qmediaplayer-still-hates-functioning</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 06:32:57 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/142421.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 24 Jan 2023 20:08:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Qmediaplayer still hates functioning on Tue, 24 Jan 2023 20:11:14 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You forgot to call <code>player-&gt;setAudioOutput(audioOutput);</code></p>
]]></description><link>https://forum.qt.io/post/745082</link><guid isPermaLink="true">https://forum.qt.io/post/745082</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 24 Jan 2023 20:11:14 GMT</pubDate></item><item><title><![CDATA[Reply to Qmediaplayer still hates functioning on Tue, 24 Jan 2023 20:29:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> it worked, thank you for helping, it probably saved me hours...</p>
]]></description><link>https://forum.qt.io/post/745085</link><guid isPermaLink="true">https://forum.qt.io/post/745085</guid><dc:creator><![CDATA[wiadro]]></dc:creator><pubDate>Tue, 24 Jan 2023 20:29:55 GMT</pubDate></item><item><title><![CDATA[Reply to Qmediaplayer still hates functioning on Tue, 24 Jan 2023 20:11:14 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You forgot to call <code>player-&gt;setAudioOutput(audioOutput);</code></p>
]]></description><link>https://forum.qt.io/post/745082</link><guid isPermaLink="true">https://forum.qt.io/post/745082</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 24 Jan 2023 20:11:14 GMT</pubDate></item></channel></rss>