Support for continuously audio buffer playback speed in each frame between .1 and 4.0 range

33 views
Skip to first unread message

Jamar Graham

unread,
Apr 29, 2015, 6:29:05 PM4/29/15
to andro...@googlegroups.com
Hi everyone,

I'm posting this on behalf of our company's programming team. We were wondering if anyone can help with an audio app that we're creating. To have our audio app perform optimally, we really need the ability to continuously adjust audio buffer playback speed in each frame with a range something like .1 and 4.0. Currently we're using OpenSL ES as a tool but that only allows between .5 and 2.0 speeds (it also seems to be generating too much noise if we adjust too much).

Now we're thinking of maybe switching to OpenAL as a potential solution, but to our knowledge that isn't supported by Google. Any help for our predicament?

Glenn Kasten

unread,
Apr 30, 2015, 11:27:01 AM4/30/15
to andro...@googlegroups.com
Can you please share some more information:
 - device name
 - platform version number
 - are you looking to preserve the pitch and only change speed,
   or to change both pitch and speed simultaneously?

Jamar Graham

unread,
Apr 30, 2015, 6:28:22 PM4/30/15
to andro...@googlegroups.com
Yes, here's some more information that might help:

- Testing on Nexus 5 and Nexus 9
- Testing using Android 4.4 and 5.0
- No, we just want to change simultaneously. No resampling needed, just playback speed adjustment in each frame (we're trying to reflect the movement of our simulated turntable)

Glenn Kasten

unread,
May 1, 2015, 8:18:55 PM5/1/15
to andro...@googlegroups.com
Thanks for the explanation. Given your need for a wider range of ratios than the platform directly supports, 
I recommend that you do the
speed/pitch conversions at application level before sending the data to the platform.
There are various open source libraries for this.

One library for adjusting playback rate without changing pitch is
https://github.com/waywardgeek/sonic
I have not used it personally, but I have heard good things about it, especially for speech.

If you want to change both playback rate and pitch simultaneously (in inverse ratio),
a sample rate converter is the way to go. Do a web search for open source
resampler or sample rate converter; there are several out there.

No matter which library you pick, be sure to confirm the license is compatible for your needs.
Reply all
Reply to author
Forward
0 new messages