-1

How to increase or decrease the speed of a mp3 using the Audio player in Android?

iOS has the below code to increase or decrease the speed. _noticeAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Rooster-mono" ofType:@"wav"]] error:nil];; if ([_noticeAudio respondsToSelector:@selector(setEnableRate:)]) _noticeAudio.enableRate = YES; if ([_noticeAudio respondsToSelector:@selector(setRate:)]) _noticeAudio.rate = 2.0;

How can i achieve the same in Android?

Pavandroid
  • 1,586
  • 2
  • 15
  • 30

1 Answers1

0

Found a solution from a query (How to slow down and stretch audio in Android?)

Used the

android.media.SoundPool

to achieve the speed rate for mp3 audio.

Community
  • 1
  • 1
Pavandroid
  • 1,586
  • 2
  • 15
  • 30