Code example for SparseIntArray

0
	protected SoundManagerImpl(final Context context, final AudioManager audiomanager) {
		this.audiomanager = audiomanager;
		this.context = context;
 
		soundpool = new SoundPool(4, AudioManager.STREAM_MUSIC, 0);
		sounds = new SparseIntArray();
 
	} 
 
	/** 
	 * Add a new Sound to the SoundPool 
	 *  
	 * @param Index 
	 *            - The Sound Index for Retrieval 
	 * @param SoundID 
	 *            - The Android ID for the Sound asset. 
	 */ 
	@Override 
	public void addSound(final int index, final int SoundID) {
		sounds.put(index, soundpool.load(context, SoundID, 1));
	}