Code example for BassBoost

Methods: getEnabled, getRoundedStrength, setEnabled

0
	} 
	 
	public void bassBoost(Context mContext, MediaPlayer mMediaPlayer, boolean enabled) {
		String TAG = "prototype_bassBoost";
		int sessionId = mMediaPlayer.getAudioSessionId();
		BassBoost bb = new BassBoost(0, sessionId);
		if (!enabled) {
			bb.setEnabled(enabled);
			return; 
		} 
		boolean bbEnabled = bb.getEnabled();
		Log.d(TAG, String.format("bb enabled? %s", bbEnabled));
		if (!bbEnabled) {
			Log.d(TAG, "enabling Bass Boost");
			bb.setEnabled(!bbEnabled);
		} 
		/*if (bb.getStrengthSupported()) 
			bb.setStrength((short) BB_LEVEL_LOW);*/ 
		Log.d(TAG, String.format("bass boost set to: %d", bb.getRoundedStrength()));
		 
	} 
	 
	/** 
	 * Changes the "reverb" (echo/surround) effect.