首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

SoundPool容易实用

2012-06-26 
SoundPool简单实用1.SoundPool soundPool new SoundPool(1, AudioManager.STREAM_SYSTEM, 10)int hit1

SoundPool简单实用

1.SoundPool soundPool = new SoundPool(1, AudioManager.STREAM_SYSTEM, 10);int hit1 = soundPool.load(myContext, R.raw.btn_sound1, 0);//加载音频文件int hit2 = soundPool.load(myContext, R.raw.btn_sound2, 0);int hit3 = soundPool.load(myContext, R.raw.btn_sound3, 0);2.soundPool.play(hit2, 2, 1, 0, 0, (float)1.4);//播放就这么简单
?

热点排行