Code example for SoundPool

Methods: setOnLoadCompleteListener

		// Set the hardware buttons to control the music 
		// Load the sound 
		loadedIds=new HashMap<Integer,Boolean>();
		//soundPool = new SoundPool(10, AudioManager.STREAM_MUSIC, 0); 
		soundPool = new SoundPool(1, AudioManager.STREAM_NOTIFICATION, 0);
		soundPool.setOnLoadCompleteListener(new OnLoadCompleteListener() {
			public void onLoadComplete(SoundPool soundPool, int sampleId,
					int status) {
				loadedIds.put(sampleId, Boolean.TRUE);
				Log.d(TAG, "loaded sound file "+sampleId+": status: "+status);
	 * load a music resource 
	 * @param resourceName 
	 * @return 
Experience pair programming with AI  Get Codota for Java