0

I'm using Delphi 10.4 for developing an Android mobile application. I'm using the TMediaPlayer component for playing MP3 files. I need to set the playback speed of the media files as 1x, 2x, and 4x. I did not find any sample code regarding this. How can I implement this feature?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Ias Trainer
  • 79
  • 1
  • 8
  • According to [the documentation](http://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Media.TMediaPlayer_Properties) such a feature does not exist. What have you tried so far? – AmigoJack Jun 17 '21 at 20:29
  • 1
    `TMediaPlayer` uses the native `MediaPlayer` class from Android (imported as `JMediaPlayer`) which does not have the ability to change the playback rate. There is another class called [`SoundPool`](https://developer.android.com/reference/android/media/SoundPool.html#setRate(int,%20float)) that does, so you'd need to use an instance of that – Dave Nottage Jun 17 '21 at 20:37
  • 1
    You might like to take a look at: https://stackoverflow.com/a/50356644/3164070 – Dave Nottage Jun 17 '21 at 20:41

0 Answers0