Back to project page feup-lpoo-android-tower-defense.
The source code is released under:
MIT License
If you think the Android project feup-lpoo-android-tower-defense 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 pt.up.fe.lpoo.framework.implementation; //from www . j a v a2 s . co m import pt.up.fe.lpoo.framework.Sound; import android.media.SoundPool; /** * Information about the implementation of the framework can be found at * http://www.kilobolt.com/day-6-the-android-game-framework-part-ii.html */ public class AndroidSound implements Sound { int soundId; SoundPool soundPool; public AndroidSound(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); } }