Code example for SoundPool

Methods: setOnLoadCompleteListener

	private  int playTime = 300; // 300 msec. to play sound effect
	private  PlayTask muzPlay;
	public SoundEngine(Context context){
		mContext = context;
		mSoundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 0);
	    mSoundPoolMap = new SparseArray<Integer>();
	    mVolumeMap = new SparseArray<Float>();
	    mLoadComplete = new SparseArray<Boolean>();
	    mSoundPool.setOnLoadCompleteListener(new OnLoadCompleteListener(){
			public void onLoadComplete(SoundPool soundPool, int sampleId,
					int status) {
				if (delayPlay){
					if (delayLooped){
Stop searching for code, let great code find you!  Add Codota to your java IDE