Qt: no playback on linux
<p>I have tried (I think) every possible way of playing audio in a Qt project, none of which have worked:</p>

<ul>
<li><code>QSound::play(...)</code></li>
<li>QMediaPlayer</li>
<li>QAudioOutput, from <a href="http://doc.qt.io/qt-4.8/qaudiooutput.html" rel="nofollow">http://doc.qt.io/qt-4.8/qaudiooutput.html</a></li>
</ul>

<p>None of these solutions play WAV or MP3, and I have tried loading the files from a resource (<code>qrc:media/file.wav</code>) or simply from disk (<code>/full/path/to/file.wav</code>).</p>

<p>I think the problem is with codecs. <code>QAudioDevice::supportedCodecs()</code> returns an empty list. I'm on a linux system that has no problems playing audio/video (Ubuntu 14.04, usually playing in VLC... that uses its own codecs?).</p>

<p>Playing with QSound (WAV &amp; MP3):</p>

<pre><code>QSoundEffect(pulseaudio): Error decoding source
</code></pre>

<p>QMediaplayer (WAV): nothing happens</p>

<p>QMediaplayer (MP3):</p>

<pre><code>GStreamer; Unable to play - "qrc:media/lowtone.mp3"
</code></pre>