Code example for SparseIntArray

Methods: put

0
	 * @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));
	} 
 
	/** 
	 * Plays a Sound 
	 *  
	 * @param index 
	 *            - The Index of the Sound to be played 
	 */ 
	@Override 
	public void playSound(final int index) {
		final float speed = 1f;
		if (sounds.get(index) == 0) {
			logger.error("Sound with index {} not available", index);
			return; 
		}