QMediaPlayer : how to play only part of an (audio) source ?



  • Hi,

    I would like to play only a single part from an audio file defined by time positions.
    I would like to do something like that for example : play(quint startPosition, quint stopPosition).
    But there is no such a function in the QMediaPlayer class.

    I could make it by connecting the QMediaPlayer signal positionChanged to a component which stops the playing when the time is passed but this is not optimal I think, because I've to set the notifyInterval to a very low value.

    Do you see a better way to do it ?

    Thanks !



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