Code example for SoundPool

Methods: resume

0
    public final void pause(int stream) {
        mSoundPool.pause(stream);
    } 
     
    public final void resume(int stream) {
       mSoundPool.resume(stream);
    } 
     
    // HACK: There's no way to pause an entire sound pool, but if we 
    // don't do something when our parent activity is paused, looping 
    // sounds will continue to play.  Rather that reproduce all the bookkeeping 
    // that SoundPool does internally here, I've opted to just pause looping 
    // sounds when the Activity is paused. 
    public void pauseAll() { 
    	final int count = mLoopingStreams.length;
    	for (int x = 0; x < count; x++) {
    		if (mLoopingStreams[x] >= 0) {
    			pause(mLoopingStreams[x]);
    		} 
    	} 
    }