См. классы Audio, AudioManager и MusicPlayer в этом репозитории: https://github.com/eligantRU/CG/tree/dev/labyrinth/labyrinth