Code example for SparseIntArray

Methods: indexOfKeyput

        if (soundId <= 0) {
            LogUtils.log(this, Log.ERROR, "Failed to assign sound for %d", id);
            return false; 
        if (mSoundPoolMap.indexOfKey(id) >= 0) {
        mSoundPoolMap.put(id, soundId);
        mStreamTypeMap.put(id, streamType);
        return true; 
     * Generates a MIDI file from the specified {@code notes} array and loads it 
     * into the specified {@code soundPool}. 
     * @param soundPool The sound pool to load the MIDI file into. 
     * @param notes An array specifying a MIDI track.