文件名称:SoundPool封装类
文件大小:1014B
文件格式:RAR
更新时间:2016-01-27 07:05:38
android 短音效
资源为一个专门处理短音效soundPool的工具类,使用起来很方便,封装的很好!使用方法: 1、你只需要在需要的地方调用这个方法进行类初始化 private void initSound() { soundPlay = new SoundPlay(); soundPlay.initSounds(this); soundPlay.loadSfx(this, R.raw.win, ID_SOUND_WIN); soundPlay.loadSfx(this, R.raw.lose, ID_SOUND_LOSE); } 2、在开始播放音效的时候调用soundPlay.play(ID_SOUND_LOSE, 0)即可实现短音效的播放。 是不是很简单呢!
【文件预览】:
SoundPlay.java