Android EnvironmentalReverb - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android EnvironmentalReverb class.

This code example shows how to use the following methods:release, getDensity, getDiffusion, setDensity, setDiffusion
    public void test1_4DiffusionAndDensity() throws Exception { 
        boolean result = false;
        String msg = "test1_4DiffusionAndDensity()";
        getReverb(0); 
        try { 
            mReverb.setDiffusion((short)500);
            short diffusion = mReverb.getDiffusion();
            assertTrue(msg +": got incorrect diffusion",
                    ((float)diffusion > (float)(500 / RATIO_TOLERANCE)) &&
                    ((float)diffusion < (float)(500 * RATIO_TOLERANCE)));
 
            mReverb.setDensity((short)500);
            short density = mReverb.getDensity();
            assertTrue(msg +": got incorrect density",
                    ((float)density > (float)(500 / RATIO_TOLERANCE)) &&
                    ((float)density < (float)(500 * RATIO_TOLERANCE)));
 
            result = true;
        } catch (IllegalArgumentException e) {
            msg = msg.concat(": Bad parameter value");

8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:release, getDecayHFRatio, getDecayTime, setDecayHFRatio, setDecayTime
    public void test1_1Decay() throws Exception { 
        boolean result = false;
        String msg = "test1_1Decay()";
        getReverb(0); 
        try { 
            mReverb.setDecayTime(500);
            int time = mReverb.getDecayTime();
            assertTrue(msg +": got incorrect decay time",
                    ((float)time > (float)(500 / DELAY_TOLERANCE)) &&
                    ((float)time < (float)(500 * DELAY_TOLERANCE)));
 
            mReverb.setDecayHFRatio((short)1000);
            short ratio = mReverb.getDecayHFRatio();
            assertTrue(msg +": got incorrect decay HF ratio",
                    ((float)ratio > (float)(1000 / RATIO_TOLERANCE)) &&
                    ((float)ratio < (float)(1000 * RATIO_TOLERANCE)));
 
            result = true;
        } catch (IllegalArgumentException e) {
            msg = msg.concat(": Bad parameter value");

6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:release, getDecayHFRatio, getDecayTime, setDecayHFRatio, setDecayTime
    public void test1_1Decay() throws Exception { 
        boolean result = false;
        String msg = "test1_1Decay()";
        getReverb(0); 
        try { 
            mReverb.setDecayTime(500);
            int time = mReverb.getDecayTime();
            assertTrue(msg +": got incorrect decay time",
                    ((float)time > (float)(500 / DELAY_TOLERANCE)) &&
                    ((float)time < (float)(500 * DELAY_TOLERANCE)));
 
            mReverb.setDecayHFRatio((short)1000);
            short ratio = mReverb.getDecayHFRatio();
            assertTrue(msg +": got incorrect decay HF ratio",
                    ((float)ratio > (float)(1000 / RATIO_TOLERANCE)) &&
                    ((float)ratio < (float)(1000 * RATIO_TOLERANCE)));
 
            result = true;
        } catch (IllegalArgumentException e) {
            msg = msg.concat(": Bad parameter value");

5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getDecayHFRatio, getDecayTime, getDensity, getDiffusion, getReflectionsDelay
		 
	} 
	 
	public void reverbStat(EnvironmentalReverb rv) {
		String TAG = "prototype_reverbStat";
		short decayHFRatio = rv.getDecayHFRatio();
		int decayTime = rv.getDecayTime();
		short density = rv.getDensity();
		short diffusion = rv.getDiffusion();
		int reflectionsDelay = rv.getReflectionsDelay();
		short reflectionsLevel = rv.getReflectionsLevel();
		int reverbDelay = rv.getReverbDelay();
		short reverbLevel = rv.getReverbLevel();
		short roomHFLevel = rv.getRoomHFLevel();
		short roomLevel = rv.getRoomLevel();
		Log.d(TAG, String.format(
			"decay hf ratio: %s, decay time: %s, density: %s, diffusion: %s, reflections delay: %s, reflections level: %s, reverb delay: %s, reverb level: %s, room hf level: %s, room level: %s", 
			decayHFRatio,
			decayTime,
			density,
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Android EnvironmentalReverb Methods: