Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [Moved] problem in Audio component in QtQuick (muted property)?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mismail
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved