androidoboe

Android oboe - How to change rate / frequency of a AudioStream after it has been opened


When working with Android SoundPool you can alter the playback rate with the following API and adjusting the rate:

SoundPool play(int soundID, float leftVolume, float rightVolume, int priority, int loop, float rate)

My question is how to do so within the Android oboe library. I know you can set the frequency to a AudioStreamBuilder, but once the stream has been opened, can you then change the rate on the fly?


Solution

  • Resampling is not supported in Oboe. It might be added in future, however, it's more likely to be added in a supporting library or in a sample.

    If you want to implement this you could use libresample from FFmpeg (here's how to add FFmpeg to Oboe).