[Moved] problem in Audio component in QtQuick (muted property)?



  • Hi all,

    I have a problem in the Audio component it does not mute if i call play() two times here is a sample code

    @import QtQuick 1.1
    import com.nokia.meego 1.0
    import QtMultimediaKit 1.1

    Page {
    tools: commonTools

    Label {
        id: label
        anchors.centerIn: parent
        text: qsTr("Hello world!")
        visible: false
    }
    
    Button{
        anchors {
            horizontalCenter: parent.horizontalCenter
            top: label.bottom
            topMargin: 10
        }
        text: qsTr("Click here!")
        onClicked: {
            player.source = "audio/zero.mp3"
            player.playing = true
        }
    }
    
    Button{
        anchors {
            horizontalCenter: parent.horizontalCenter
            top: label.bottom
            topMargin: 60
        }
        text: qsTr("Click here!")
        onClicked: {
            player.source = "audio/zero.mp3"
            player.muted = true
            player.playing = true
        }
    }
    
    Audio{
        id: player
    
        onStopped: {
            console.log("playing =" + playing)
        }
    }
    

    }
    @

    also I can't make the player muted by setting the muted property in it's construction like this
    @Audio{
    id: player
    muted: true
    }@

    it does not mute.

    it is only muted if i used only one instance and played it one time and set the muted property before the playing
    is this a bug?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.