Reputation: 31
I have been trying to figure out how to use audiotrack, but the documentation is kind of confusing. I am trying to replay a audio file with a higher pitch, please may someone post up the way to do it with explanation. I can't use soundpool because it does not work for long sounds.
Also if you know any libaries or a way that will allow me to play the sound with a higher pitch without changing the speed please let me know. Thank you for the help.
Upvotes: 0
Views: 1579
Reputation: 550
You cannot do it with audioTrack itself except if you change the samplerate but this will lead to increasing/decreasing the speed and might introduce artifacts.
Be aware that pitch shifting without changing the speed can be very expensive since most algorithms use for example several FFT passes.
Here is a good tutorial which provided me decent results: http://blogs.zynaptiq.com/bernsee/pitch-shifting-using-the-ft/
Upvotes: 1