MediaPlayer to play source more than once



  • 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?



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



  • [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.



  • 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 :-)



  • Ok, thx!


Log in to reply
 

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