Back to project page project2.
The source code is released under:
MIT License
If you think the Android project project2 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package team2.scdm; //from w w w . ja v a 2 s.c o m import android.media.SoundPool; import team2.scdm.Sound; public class GameSound implements Sound{ int soundID; SoundPool soundPool; public GameSound(SoundPool soundpool, int soundID) { this.soundID = soundID; this.soundPool = soundpool; } @Override public void play(float volume) { soundPool.play(soundID, volume, volume, 0, 0, 1); } @Override public void dispose() { soundPool.unload(soundID); } }