[SOLVED] How to set playbackRate for pc.SoundComponent

Hello!

I want to change the music playback speed.

Does playcanvas allow me to change playbackRate in pc.SoundComponent or anything like that?

Hi @hoanguyen,

Yes sure, it’s called pitch and using that you can increase/decrease the speed of your sounds/music playback.

this.entity.sound.slot('speech').pitch = 2;

Here are the properties and methods available for each sound slot.
https://developer.playcanvas.com/en/api/pc.SoundSlot.html

1 Like

Thank you!

I Will try

:+1:

1 Like