PresetReverb getPreset - top ranked examples from Open Source projects

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

This code example shows how to use the following methods:release, getPreset, setPreset
    public void test1_0Preset() throws Exception { 
        boolean result = false;
        String msg = "test1_0Preset()";
        getReverb(0); 
        try { 
            mReverb.setPreset((short)PresetReverb.PRESET_LARGEROOM);
            short preset = mReverb.getPreset();
            assertEquals(msg +": got incorrect preset",
                         (short)PresetReverb.PRESET_LARGEROOM,
                         preset);
            result = true;
        } catch (IllegalArgumentException e) {
            msg = msg.concat(": Bad parameter value");
            loge(msg, "Bad parameter value");
        } catch (UnsupportedOperationException e) {
            msg = msg.concat(": get parameter() rejected");
            loge(msg, "get parameter() rejected");
        } catch (IllegalStateException e) {
            msg = msg.concat("get parameter() called in wrong state");
            loge(msg, "get parameter() called in wrong state");

9
CodeRank
This code example shows how to use the following methods:release, getPreset, setPreset
    public void test1_0Preset() throws Exception { 
        boolean result = false;
        String msg = "test1_0Preset()";
        getReverb(0); 
        try { 
            mReverb.setPreset((short)PresetReverb.PRESET_LARGEROOM);
            short preset = mReverb.getPreset();
            assertEquals(msg +": got incorrect preset",
                         (short)PresetReverb.PRESET_LARGEROOM,
                         preset);
            result = true;
        } catch (IllegalArgumentException e) {
            msg = msg.concat(": Bad parameter value");
            loge(msg, "Bad parameter value");
        } catch (UnsupportedOperationException e) {
            msg = msg.concat(": get parameter() rejected");
            loge(msg, "get parameter() rejected");
        } catch (IllegalStateException e) {
            msg = msg.concat("get parameter() called in wrong state");
            loge(msg, "get parameter() called in wrong state");

7
CodeRank
This code example shows how to use the following methods:release, getPreset, setPreset
    public void test1_0Preset() throws Exception { 
        boolean result = false;
        String msg = "test1_0Preset()";
        getReverb(0); 
        try { 
            mReverb.setPreset((short)PresetReverb.PRESET_LARGEROOM);
            short preset = mReverb.getPreset();
            assertEquals(msg +": got incorrect preset",
                         (short)PresetReverb.PRESET_LARGEROOM,
                         preset);
            result = true;
        } catch (IllegalArgumentException e) {
            msg = msg.concat(": Bad parameter value");
            loge(msg, "Bad parameter value");
        } catch (UnsupportedOperationException e) {
            msg = msg.concat(": get parameter() rejected");
            loge(msg, "get parameter() rejected");
        } catch (IllegalStateException e) {
            msg = msg.concat("get parameter() called in wrong state");
            loge(msg, "get parameter() called in wrong state");

5
CodeRank
This code example shows how to use the following methods:getPreset
 
	public int getReverb() { 
		if(!effect_on || reverb == null){
			return PresetReverb.PRESET_NONE;
		} 
		return reverb.getPreset();
	} 
	 
	public void setVolume(int pan,int volume){
		vol_pan = pan;
		vol_lev = volume;
		float temp1 = (float) Math.sqrt(1.0 - (pan*pan)/10000.0)*volume /100;
		float temp2 = (float) Math.sqrt(1.0 - (100 - pan)*(100 - pan)/10000.0)*volume /100;
		mp.setVolume(temp1, temp2);
		 
	} 
	 
	public int getPan(){ 
		return vol_pan;
	} 
4
CodeRank
getPreset Method Overview
Gets current reverb preset.
See Code Examples for other Android PresetReverb Methods: