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. [SOLVED]Problem with QML Audio: no sound

[SOLVED]Problem with QML Audio: no sound

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 2.8k Views
  • 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.
  • R Offline
    R Offline
    Roumed
    wrote on 12 Mar 2014, 06:29 last edited by
    #1

    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

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Roumed
      wrote on 13 Mar 2014, 07:07 last edited by
      #2

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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aabc
        wrote on 13 Apr 2014, 11:23 last edited by
        #3

        What about other formats ?

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Roumed
          wrote on 13 Apr 2014, 11:33 last edited by
          #4

          Same with mp3.
          Report about it here: "QTBUG-37480":https://bugreports.qt-project.org/browse/QTBUG-37480

          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