Here is the code
public void loadSound (String strSound, int stream) { boolean loaded = false; mSoundPool.setOnLoadCompleteListener(new OnLoadCompleteListener() { @Override public void onLoadComplete(SoundPool soundPool, int sampleId, int status) { mSoundPool.play(stream, streamVolume, streamVolume, 1, LOOP_1_TIME, 1f); } }); try { stream= mSoundPool.load(aMan.openFd(strSound), 1); } catch (IOException e) {
source share