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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations