Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    MediaPlayer to play source more than once

    Mobile and Embedded
    2
    5
    945
    Loading More Posts
    • 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.
    • H
      habamax last edited by

      I try to play a sound in mousearea's onClick and it doesn't play on the next presses.

      As a workaround I reassign MediaPlayer's source property to "" and then to the same file to play it twice and more.

      What is the right way to play the same media multiple times (not looped) on some event?

      1 Reply Last reply Reply Quote 0
      • Gianluca
        Gianluca last edited by

        Try the QSoundEffect
        (I didn't try, but the documentation says that what your are looking for :-P)

        1 Reply Last reply Reply Quote 0
        • H
          habamax last edited by

          [quote author="Gianluca" date="1405322092"]Try the QSoundEffect (I didn't try, but the documentation says that what your are looking for :-P) [/quote]

          As far as I remember It doesn't play mp3 does it?
          Of course I could convert them to wav but I thought there is a better way.

          1 Reply Last reply Reply Quote 0
          • Gianluca
            Gianluca last edited by

            I suggest you to don't use encoded sounds for sound effects because they cannot played with low-latency, and hence the user might experience a sensible delay on some devices.
            So, even if QSoundEffect would play MP3, I strongly advice you to convert the sound effects into .WAV :-)

            1 Reply Last reply Reply Quote 0
            • H
              habamax last edited by

              Ok, thx!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post