728x90
반응형
SoundPool soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 0);
int soundPlay1 = soundPool.load(this, R.raw.sound1,1);
int soundPlay2 = soundPool.load(this, R.raw.sound2,1);
int soundPlay3 = soundPool.load(this, R.raw.sound3,1);
int soundPlay4 = soundPool.load(this, R.raw.sound4,1);
soundPool.play(soundPlay1, 1f,1f,0,0,1f);
soundPool.play(soundPlay2, 1f,1f,0,0,1f);
soundPool.play(soundPlay3, 1f,1f,0,0,1f);
soundPool.play(soundPlay4, 1f,1f,0,0,1f);
728x90
반응형
'# Android' 카테고리의 다른 글
[Android] invalid vcs root mapping 해결 요약 (0) | 2022.05.01 |
---|---|
[Android] gradle build error 해결법 요약 - an exception occurred applying plugin request [id: 'com.android.application'] (0) | 2022.05.01 |
[Android] 애니메이션 이동 후 고정 (0) | 2022.02.19 |
[Android] 자연스러운 애니메이션 - 보간, interpolator (0) | 2022.02.18 |
[Android] 일정 시간 뒤 실행 - postDelayed(); (0) | 2022.02.18 |