Search in sources :

Example 16 with Visualizer

use of android.media.audiofx.Visualizer in project android_frameworks_base by AOSPA.

the class MediaVisualizerTest method getVisualizer.

private void getVisualizer(int session) {
    if (mVisualizer == null || session != mSession) {
        if (session != mSession && mVisualizer != null) {
            mVisualizer.release();
            mVisualizer = null;
        }
        try {
            mVisualizer = new Visualizer(session);
            mSession = session;
        } catch (IllegalArgumentException e) {
            Log.e(TAG, "getVisualizer() Visualizer not found exception: " + e);
        } catch (UnsupportedOperationException e) {
            Log.e(TAG, "getVisualizer() Effect library not loaded exception: " + e);
        }
    }
    assertNotNull("could not create mVisualizer", mVisualizer);
}
Also used : Visualizer(android.media.audiofx.Visualizer)

Example 17 with Visualizer

use of android.media.audiofx.Visualizer in project android_frameworks_base by AOSPA.

the class MediaVisualizerTest method test0_0ConstructorAndRelease.

//-----------------------------------------------------------------
// VISUALIZER TESTS:
//----------------------------------
//-----------------------------------------------------------------
// 0 - constructor
//----------------------------------
//Test case 0.0: test constructor and release
@LargeTest
public void test0_0ConstructorAndRelease() throws Exception {
    boolean result = false;
    String msg = "test1_0ConstructorAndRelease()";
    Visualizer visualizer = null;
    try {
        visualizer = new Visualizer(0);
        assertNotNull(msg + ": could not create Visualizer", visualizer);
        result = true;
    } catch (IllegalArgumentException e) {
        msg = msg.concat(": Visualizer not found");
    } catch (UnsupportedOperationException e) {
        msg = msg.concat(": Effect library not loaded");
    } finally {
        if (visualizer != null) {
            visualizer.release();
        }
    }
    assertTrue(msg, result);
}
Also used : Visualizer(android.media.audiofx.Visualizer) LargeTest(android.test.suitebuilder.annotation.LargeTest)

Example 18 with Visualizer

use of android.media.audiofx.Visualizer in project android_frameworks_base by ResurrectionRemix.

the class MediaVisualizerTest method test0_0ConstructorAndRelease.

//-----------------------------------------------------------------
// VISUALIZER TESTS:
//----------------------------------
//-----------------------------------------------------------------
// 0 - constructor
//----------------------------------
//Test case 0.0: test constructor and release
@LargeTest
public void test0_0ConstructorAndRelease() throws Exception {
    boolean result = false;
    String msg = "test1_0ConstructorAndRelease()";
    Visualizer visualizer = null;
    try {
        visualizer = new Visualizer(0);
        assertNotNull(msg + ": could not create Visualizer", visualizer);
        result = true;
    } catch (IllegalArgumentException e) {
        msg = msg.concat(": Visualizer not found");
    } catch (UnsupportedOperationException e) {
        msg = msg.concat(": Effect library not loaded");
    } finally {
        if (visualizer != null) {
            visualizer.release();
        }
    }
    assertTrue(msg, result);
}
Also used : Visualizer(android.media.audiofx.Visualizer) LargeTest(android.test.suitebuilder.annotation.LargeTest)

Example 19 with Visualizer

use of android.media.audiofx.Visualizer in project android_frameworks_base by ResurrectionRemix.

the class MediaVisualizerTest method getVisualizer.

private void getVisualizer(int session) {
    if (mVisualizer == null || session != mSession) {
        if (session != mSession && mVisualizer != null) {
            mVisualizer.release();
            mVisualizer = null;
        }
        try {
            mVisualizer = new Visualizer(session);
            mSession = session;
        } catch (IllegalArgumentException e) {
            Log.e(TAG, "getVisualizer() Visualizer not found exception: " + e);
        } catch (UnsupportedOperationException e) {
            Log.e(TAG, "getVisualizer() Effect library not loaded exception: " + e);
        }
    }
    assertNotNull("could not create mVisualizer", mVisualizer);
}
Also used : Visualizer(android.media.audiofx.Visualizer)

Example 20 with Visualizer

use of android.media.audiofx.Visualizer in project android_frameworks_base by crdroidandroid.

the class MediaVisualizerTest method test0_0ConstructorAndRelease.

//-----------------------------------------------------------------
// VISUALIZER TESTS:
//----------------------------------
//-----------------------------------------------------------------
// 0 - constructor
//----------------------------------
//Test case 0.0: test constructor and release
@LargeTest
public void test0_0ConstructorAndRelease() throws Exception {
    boolean result = false;
    String msg = "test1_0ConstructorAndRelease()";
    Visualizer visualizer = null;
    try {
        visualizer = new Visualizer(0);
        assertNotNull(msg + ": could not create Visualizer", visualizer);
        result = true;
    } catch (IllegalArgumentException e) {
        msg = msg.concat(": Visualizer not found");
    } catch (UnsupportedOperationException e) {
        msg = msg.concat(": Effect library not loaded");
    } finally {
        if (visualizer != null) {
            visualizer.release();
        }
    }
    assertTrue(msg, result);
}
Also used : Visualizer(android.media.audiofx.Visualizer) LargeTest(android.test.suitebuilder.annotation.LargeTest)

Aggregations

Visualizer (android.media.audiofx.Visualizer)20 LargeTest (android.test.suitebuilder.annotation.LargeTest)6 BassBoost (android.media.audiofx.BassBoost)1 Equalizer (android.media.audiofx.Equalizer)1 PresetReverb (android.media.audiofx.PresetReverb)1