Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. MediaPlayer to play source more than once
QtWS25 Last Chance

MediaPlayer to play source more than once

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 1.2k 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.
  • H Offline
    H Offline
    habamax
    wrote on last edited by
    #1

    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
    0
    • GianlucaG Offline
      GianlucaG Offline
      Gianluca
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • H Offline
        H Offline
        habamax
        wrote on last edited by
        #3

        [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
        0
        • GianlucaG Offline
          GianlucaG Offline
          Gianluca
          wrote on last edited by
          #4

          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
          0
          • H Offline
            H Offline
            habamax
            wrote on last edited by
            #5

            Ok, thx!

            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