Friday, June 1, 2012

Playing Sound Effects in Game with Android

There are 2 classes that can be used for playing sound in Android:
  • MediaPlayer
  • SoundPool
MediaPlayer is more suited for playing long sounds such as BGM. Trying to play sound effects with SoundPool seems to result in some lag.

SoundPool is more suited for playing short sounds such as Sound Effects. However, as at Android 2.0, there seems to be a bug that makes some MP3 sounds not work with SoundPool. Some have suggested using the OGG format as a workaround.

Links:

No comments:

Post a Comment