SoundPool
is faster than MediaPlayer
but it has its own limitations.
SoundPool
is used for small sounds like the ones that you can use in your onClick()
method so that it can make a click sound every time user click anywhere because these files are pre-loaded in the memory which doesn't let the CPU suffer for its deeds and that is why SoundPool
is faster than MediaPlayer
. Also, it can manage the number of audio streams rendered at once.
MediaPlayer
is used for such cases in which user have access to the playback options like play, pause, seek, start etc. Also, commonly for long length audio MediaPlayer
is good as you cannot load long length audio in the memory beforehand. You can also use MediaPlayer
to play the audio over internet (it would be useful if you are planning to do it for future release).
And in your case user is allowed to play audio from a file browser activity, I suggest you go for MediaPlayer
.