I am developing an android application using MediaPlayer. I run small midi files (20 - 30 seconds long, it's about 10 - 30 Kb). When the player is playing, at some point I call the seekTo(0) method to start playback from the beginning. And everything works! So what is the problem you ask?
I noticed that if you run the application on older devices (Xiaomi Redmi Pro 3 with API 21, Oppo R 819 with API 17), then the transition occurs smoothly as I need; but on modern devices (Xiaomi Redmi Pro 9 with API 30), the transition occurs with a gap - a pause of about 200 - 300 ms is heard. It sounds awful. Why does MediaPlayer.seekTo(0) work differently on different devices?
Please tell me how I can make the mediaPlayer.seekTo() method run seamlessly on all devices.