2

Is there a java audio library that is capable of setting the playback rate of the audio(controlling the speed of the audio) as well as being able to return me the current position of the playback and the total duration of the audio stream?

I noticed that the android mediaplayer would be able to return me the current position of the playback and the total duration of the audio stream but it doesn't let me set the playback rate.

And unfortunately the android soundpool lets me set the playback rate but doesn't let me get the current position or the total duration of the audio stream.

Do you guys have any suggestion for what java library would be able to help me out. Any suggestion would be appreciated, thanks.

CRABOLO
  • 8,605
  • 39
  • 41
  • 68
xiaowoo
  • 2,248
  • 7
  • 34
  • 45

2 Answers2

1

The popular Android pod casting application DoggCatcher uses a third party player called Presto for this. I haven't looked into how you interact with it programmatically but it functions good in DoggCatcher when I use it there.

http://www.aocate.com/presto/

https://play.google.com/store/apps/details?id=com.aocate.presto&hl=en

Lance Johnson
  • 1,226
  • 12
  • 8
0

Try the SoundPool class.

The play function seems to have all of the features you're looking for...

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

There are also setter functions that can be really useful.

e.g. void setRate(int streamID, float rate)

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
Grant Nelson
  • 71
  • 1
  • 1