SoundPool resume - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for SoundPool resume method.

This code example shows how to use the following methods:resume
	public void pauseEffect(final int pStreamID) {
		this.mSoundPool.pause(pStreamID);
	} 
 
	public void resumeEffect(final int pStreamID) {
		this.mSoundPool.resume(pStreamID);
	} 
 
	public void pauseAllEffects() { 
		this.mSoundPool.autoPause();
	} 
 
	public void resumeAllEffects() { 
		// can not only invoke SoundPool.autoResume() here, because 
		// it only resumes all effects paused by pauseAllEffects() 
		if (!this.mPathStreamIDsMap.isEmpty()) {
			final Iterator<Entry<String, ArrayList<Integer>>> iter = this.mPathStreamIDsMap.entrySet().iterator();
			while (iter.hasNext()) {
				final Entry<String, ArrayList<Integer>> entry = iter.next();
				for (final int pStreamID : entry.getValue()) {
6
CodeRank
This code example shows how to use the following methods:resume
	 
	public void resumeEffect(int soundId){
        Integer streamId = this.mSoundIdStreamIdMap.get(soundId);
         
        if (streamId != null && streamId.intValue() != INVALID_STREAM_ID){
        	this.mSoundPool.resume(streamId.intValue());
        	this.mPathSoundIDMap.remove(soundId);
        } 
	} 
	 
	public void pauseAllEffects(){ 
		// autoResume is available since level 8 
		pauseOrResumeAllEffects(true); 
	} 
	 
	public void resumeAllEffects(){ 
		// autoPause() is available since level 8 
		pauseOrResumeAllEffects(false); 
	} 
	 
6
CodeRank
This code example shows how to use the following methods:resume
   * @param snum 音番号。 
   */ 
  public boolean resumeSe( int snum )
  { 
    if ( se.containsKey( snum ) == false ){ return false;}
    sp.resume( se.get( snum ) );
    return true; 
  } 
 
  /** 
   * SEの再生を一時停止する。 
   * @param snum 音番号。 
   */ 
  public boolean pauseSe( int snum )
  { 
    if ( se.containsKey( snum ) == false ){ return false;}
    sp.pause( se.get( snum ) );
    return true; 
  } 
 
3
CodeRank
This code example shows how to use the following methods:resume
	public void pauseEffect(final int pStreamID) {
		this.mSoundPool.pause(pStreamID);
	} 
 
	public void resumeEffect(final int pStreamID) {
		this.mSoundPool.resume(pStreamID);
	} 
 
	public void pauseAllEffects() { 
		this.mSoundPool.autoPause();
	} 
 
	public void resumeAllEffects() { 
		// can not only invoke SoundPool.autoResume() here, because 
		// it only resumes all effects paused by pauseAllEffects() 
		if (!this.mPathStreamIDsMap.isEmpty()) {
			final Iterator<Entry<String, ArrayList<Integer>>> iter = this.mPathStreamIDsMap.entrySet().iterator();
			while (iter.hasNext()) {
				final Entry<String, ArrayList<Integer>> entry = iter.next();
				for (final int pStreamID : entry.getValue()) {
3
CodeRank
This code example shows how to use the following methods:resume
	 
	public void resumeEffect(int soundId){
        Integer streamId = this.mSoundIdStreamIdMap.get(soundId);
         
        if (streamId != null && streamId.intValue() != INVALID_STREAM_ID){
        	this.mSoundPool.resume(streamId.intValue());
        	this.mPathSoundIDMap.remove(soundId);
        } 
	} 
	 
	public void pauseAllEffects(){ 
		// autoResume is available since level 8 
		pauseOrResumeAllEffects(true); 
	} 
	 
	public void resumeAllEffects(){ 
		// autoPause() is available since level 8 
		pauseOrResumeAllEffects(false); 
	} 
	 
3
CodeRank
This code example shows how to use the following methods:resume
	 
	public void resumeEffect(int soundId){
        Integer streamId = this.mSoundIdStreamIdMap.get(soundId);
         
        if (streamId != null && streamId.intValue() != INVALID_STREAM_ID){
        	this.mSoundPool.resume(streamId.intValue());
        	this.mPathSoundIDMap.remove(soundId);
        } 
	} 
	 
	public void pauseAllEffects(){ 
		// autoResume is available since level 8 
		pauseOrResumeAllEffects(true); 
	} 
	 
	public void resumeAllEffects(){ 
		// autoPause() is available since level 8 
		pauseOrResumeAllEffects(false); 
	} 
	 
4
CodeRank
This code example shows how to use the following methods:resume
	 * @param streamID 
	 *            ������ID 
	 */ 
	public void resume(int streamID) {
		if (streamID != 0) {
			soundPool.resume(streamID);
		} 
	} 
 
	/** 
	 * ֹͣ 
	 *  
	 * @param streamID 
	 *            ������ID 
	 */ 
	public void stop(int streamID) {
		if (streamID != 0) {
			soundPool.stop(streamID);
		} 
	} 
4
CodeRank
This code example shows how to use the following methods:resume
		soundPool.pause(getInt(param, STREAM_ID));
	} 
	 
	@Kroll.method 
	public void resume(@SuppressWarnings("rawtypes") HashMap param) {
		soundPool.resume(getInt(param, STREAM_ID));
	} 
	 
	@Kroll.method 
	public void stop(@SuppressWarnings("rawtypes") HashMap param) {
		soundPool.stop(getInt(param, STREAM_ID));
	} 
	 
	@Kroll.method 
	public void release() { 
		if (soundPool != null) {
			soundPool.release();
			soundPool = null;
		} 
	} 
4
CodeRank
This code example shows how to use the following methods:resume
	 
	/** 
	 * Resumes the sound from the position stop() was called on it. 
	 */ 
	public void resume() { 
		SOUND_POOL.resume(mStreamId);
	} 
	 
	/** 
	 * Get the volume factor (a value from 0 to 1) of the sound during playback. 
	 */ 
	public float getVolume() { return mVolume; }
	 
	/** 
	 * Alter the volume factor (a value from 0 to 1) of the sound during playback. 
	 */ 
	public void setVolume(float value) {
		if (value < 0) 
			value = 0;
		if (mVolume == value) 
5
CodeRank
This code example shows how to use the following methods:resume
	 
	public void resumeEffect(int soundId){
        Integer streamId = this.mSoundIdStreamIdMap.get(soundId);
         
        if (streamId != null && streamId.intValue() != INVALID_STREAM_ID){
        	this.mSoundPool.resume(streamId.intValue());
        	this.mPathSoundIDMap.remove(soundId);
        } 
	} 
	 
	public void pauseAllEffects(){ 
		// autoResume is available since level 8 
		pauseOrResumeAllEffects(true); 
	} 
	 
	public void resumeAllEffects(){ 
		// autoPause() is available since level 8 
		pauseOrResumeAllEffects(false); 
	} 
	 
4
CodeRank
resume Method Overview
Resume a playback stream.
See Code Examples for other Android SoundPool Methods: