I'm doing a simple game and since I need some short sound effects, I thought the Soundpool would be appropriate. But it's not working! I don't get any sounds! I have checked my code over and over again and also compared it with several other examples, but still not working! I'm confused and need some help to get it to work.
Here is my code. Have I missed something or could I do it in another way? preciated some help! Thanks!
soundPool = new SoundPool(4,AudioManager.STREAM_MUSIC, 0);
soundPoolMap = new HashMap();
soundPoolMap.put(0, soundPool.load(this, R.raw.bonk2, 1));
soundPool.play(0, 1f, 1f, 1, 0, 1f);
soundPool.release();
.
stackoverflow.comm
No comments:
Post a Comment