How to change the speed of an audio without affecting its pitch and vice a versa at runtime?
Hi all, I want an explicit control over both the speed and the pitch of an audio. The problem is when we change the pitch of an Audio Source via code(AudioSource.pitch) both speed and the pitch get affected.
I am aware that the pitch shifter audio effect with unity Audio Mixer is capable of controlling the pitch of the audio without affecting the speed. So how to go about changing the speed without affecting the pitch?
Researched the following links but no luck:
http://answers.unity3d.com/questions/25139/how-i-can-change-the-speed-of-a-song-or-sound.html
http://answers.unity3d.com/questions/411746/how-to-change-pitch-without-affecting-speed.html
Please help.
Answer by tuanzi88 · Sep 12, 2016 at 09:33 AM
Have the same question!
I didn't find any solution to this until now. As a work around, I used n number of audio files which had different pitch. For me the audio was a simple beep having length of 0.3 sec, so I used InvokeRepeating() to control the speed at which the audio is played keeping Loop = false.
Your answer
Follow this Question
Related Questions
car audio pitch help? 1 Answer
play Audio Array in java 0 Answers
Controlling Pitch of Audio Source with the objects Position (Y position) 2 Answers
audio.play does not work 1 Answer
Background Music Masks Sound Effects 1 Answer