PresetReverb setPreset - 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 setPreset 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
setPreset Method Overview
Enables a preset on the reverb.
See Code Examples for other Android PresetReverb Methods: