Important: Please read the Qt Code of Conduct -

[SOLVED]Problem with QML Audio: no sound

  • Hi to all.
    I have simple qml script with audio:
    import QtQuick 2.2
    import QtMultimedia 5.0

    Rectangle {

    Audio {
        autoLoad: true
        autoPlay: true
        source: "file://file1.wav"
        muted: false
        volume: 0.5


    So if i'm build my project with Qt Creator - it is ok: file playing, i can hear sound. But if i try to use CMake, file will be played (status changes, no errors, file is available, buffer is full, position changes, duration is known), but there is no sound. And this is my problem. The only strange thing is while playing value of muted property is true, and i can change it to false - it'll just change back to true without any messages.
    I've tried to use MediaPlayer instead of Audio, and it's the same, and SoundEffects, and there is a sound!!! But i need to change position at playing, that's why i need Audio exectly.

    Could anyone help me?

    I used Qt 5.2.1

  • Okey, i fix it. For some reason executable file which name contains "_" can't play sound. I have no idea why.

  • What about other formats ?

  • Same with mp3.
    Report about it here: "QTBUG-37480":

Log in to reply