Hello everyone,
I’m making a game play with music. I wanna set playback rate follow as level of game. But I cant find any function to set it. Any body can give me some advise ?
Thanks you for reading !
Hello everyone,
I’m making a game play with music. I wanna set playback rate follow as level of game. But I cant find any function to set it. Any body can give me some advise ?
Thanks you for reading !
First, change the audio asset property DownloadMode
to DOM Audio
then you can use the ‘playbackRate’
var audio = cc.audioEngine._id2audio[0];
audio._element.playbackRate = 2
or
this.audioSource.audio._element.playbackRate = 2
This solution only works on Web platform.
thanks you for your help . Unfortunately, I’m working on ios and android.