MediaPlayer initialization is performed on the main looper thread, but not all accesses to 'player' are correctly synchronized:
stop()
dispose()
isPlaying()
setVolume()
In addition, the done/prepared flag should be made volatile since they're also written to from the looper thread.
Why is the initialization of the MediaPlayer done on the main looper anyway? Can't you use the current thread's looper (or create it if one doesn't exist yet)?
MediaPlayer initialization is performed on the main looper thread, but not all accesses to 'player' are correctly synchronized:
In addition, the done/prepared flag should be made volatile since they're also written to from the looper thread.
Why is the initialization of the MediaPlayer done on the main looper anyway? Can't you use the current thread's looper (or create it if one doesn't exist yet)?