After creating an auxiliary effect (e.g. {@link android.media.EnvironmentalReverb}), - * retrieve its ID with {@link android.media.AudioEffect#getId()} and use it when calling + *
After creating an auxiliary effect (e.g. + * {@link android.media.audiofx.EnvironmentalReverb}), retrieve its ID with + * {@link android.media.audiofx.AudioEffect#getId()} and use it when calling * this method to attach the audio track to the effect. - *
To detach the effect from the audio track, call this method with a null effect id. + *
To detach the effect from the audio track, call this method with a + * null effect id. * * @param effectId system wide unique id of the effect to attach * @return error code or success, see {@link #SUCCESS}, diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java index 280def95fca69..cb46a29dc4b04 100644 --- a/media/java/android/media/MediaPlayer.java +++ b/media/java/android/media/MediaPlayer.java @@ -1210,9 +1210,10 @@ public class MediaPlayer * effect which can be applied on any sound source that directs a certain amount of its * energy to this effect. This amount is defined by setAuxEffectSendLevel(). * {@see #setAuxEffectSendLevel(float)}. - *
After creating an auxiliary effect (e.g. {@link android.media.EnvironmentalReverb}), - * retrieve its ID with {@link android.media.AudioEffect#getId()} and use it when calling - * this method to attach the player to the effect. + *
After creating an auxiliary effect (e.g. + * {@link android.media.audiofx.EnvironmentalReverb}), retrieve its ID with + * {@link android.media.audiofx.AudioEffect#getId()} and use it when calling this method + * to attach the player to the effect. *
To detach the effect from the player, call this method with a null effect id. *
This method must be called after one of the overloaded setDataSource
* methods.
diff --git a/media/java/android/media/AudioEffect.java b/media/java/android/media/audiofx/AudioEffect.java
similarity index 89%
rename from media/java/android/media/AudioEffect.java
rename to media/java/android/media/audiofx/AudioEffect.java
index ed7601eb19c4b..3e54627518635 100644
--- a/media/java/android/media/AudioEffect.java
+++ b/media/java/android/media/audiofx/AudioEffect.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.media;
+package android.media.audiofx;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
@@ -29,22 +29,35 @@ import java.nio.ByteBuffer;
import java.util.UUID;
/**
- * AudioEffect is the base class for implementing audio effect control in Java
- * applications.
- *
Creating an AudioEffect object will create the effect engine in - * audio framework if no instance of the same effect type exists in the - * specified audio session. If one exists, this instance will be used. - *
The application creating the AudioEffect object (or a derived class) will either - * receive control of the effect engine or not depending on the priority - * parameter. If priority is higher than the priority used by the current effect - * engine owner, the control will be transfered to the new object. Otherwise - * control will remain with the previous object. In this case, the new - * application will be notified of changes in effect engine state or control - * ownership by the appropiate listener. - *
If the effect is to be applied to a specific AudioTrack or MediaPlayer instance, - * the application must specify the audio session ID of that instance when calling the AudioEffect - * constructor. + * AudioEffect is the base class for controlling audio effects provided by the android audio + * framework. + *
Applications should not use the AudioEffect class directly but one of its derived classes to + * control specific effects: + *
If the audio effect is to be applied to a specific AudioTrack or MediaPlayer instance, + * the application must specify the audio session ID of that instance when creating the AudioEffect. + * (see {@link android.media.MediaPlayer#getAudioSessionId()} for details on audio sessions). + * To apply an effect to the global audio output mix, session 0 must be specified when creating the + * AudioEffect. + *
Creating an effect on the output mix (audio session 0) requires permission + * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS} + *
Creating an AudioEffect object will create the corresponding effect engine in the audio + * framework if no instance of the same effect type exists in the specified audio session. + * If one exists, this instance will be used. + *
The application creating the AudioEffect object (or a derived class) will either receive
+ * control of the effect engine or not depending on the priority parameter. If priority is higher
+ * than the priority used by the current effect engine owner, the control will be transfered to the
+ * new object. Otherwise control will remain with the previous object. In this case, the new
+ * application will be notified of changes in effect engine state or control ownership by the
+ * appropiate listener.
*/
+
public class AudioEffect {
static {
System.loadLibrary("audioeffect_jni");
@@ -62,32 +75,38 @@ public class AudioEffect {
/**
* UUID for environmental reverb effect
+ * @hide
*/
public static final UUID EFFECT_TYPE_ENV_REVERB = UUID
.fromString("c2e5d5f0-94bd-4763-9cac-4e234d06839e");
/**
* UUID for preset reverb effect
+ * @hide
*/
public static final UUID EFFECT_TYPE_PRESET_REVERB = UUID
.fromString("47382d60-ddd8-11db-bf3a-0002a5d5c51b");
/**
* UUID for equalizer effect
+ * @hide
*/
public static final UUID EFFECT_TYPE_EQUALIZER = UUID
.fromString("0bed4300-ddd6-11db-8f34-0002a5d5c51b");
/**
* UUID for bass boost effect
+ * @hide
*/
public static final UUID EFFECT_TYPE_BASS_BOOST = UUID
.fromString("0634f220-ddd4-11db-a0fc-0002a5d5c51b");
/**
* UUID for virtualizer effect
+ * @hide
*/
public static final UUID EFFECT_TYPE_VIRTUALIZER = UUID
.fromString("37cc2c00-dddd-11db-8577-0002a5d5c51b");
/**
* Null effect UUID. Used when the UUID for effect type of
+ * @hide
*/
public static final UUID EFFECT_TYPE_NULL = UUID
.fromString("ec7178ec-e5e1-4432-a3f4-4657e6795210");
@@ -95,10 +114,12 @@ public class AudioEffect {
/**
* State of an AudioEffect object that was not successfully initialized upon
* creation
+ * @hide
*/
public static final int STATE_UNINITIALIZED = 0;
/**
* State of an AudioEffect object that is ready to be used.
+ * @hide
*/
public static final int STATE_INITIALIZED = 1;
@@ -106,14 +127,17 @@ public class AudioEffect {
// frameworks/base/include/media/AudioEffect.h
/**
* Event id for engine control ownership change notification.
+ * @hide
*/
public static final int NATIVE_EVENT_CONTROL_STATUS = 0;
/**
* Event id for engine state change notification.
+ * @hide
*/
public static final int NATIVE_EVENT_ENABLED_STATUS = 1;
/**
* Event id for engine parameter change notification.
+ * @hide
*/
public static final int NATIVE_EVENT_PARAMETER_CHANGED = 2;
@@ -151,15 +175,17 @@ public class AudioEffect {
public static final int ERROR_DEAD_OBJECT = -7;
/**
- * The effect descriptor contains necessary information to facilitate
- * effects enumeration:
+ * The effect descriptor contains information on a particular effect implemented in the
+ * audio framework:
*
The extra value is of type int and is the audio session ID. - * - * @see android.media.MediaPlayer#setAudioSessionId(int) + * @see android.media.MediaPlayer#getAudioSessionId() for details on audio sessions. */ public static final String EXTRA_AUDIO_SESSION = "android.media.extra.AUDIO_SESSION"; @@ -1086,6 +1156,9 @@ public class AudioEffect { // Utility methods // ------------------ + /** + * @hide + */ public void checkState(String methodName) throws IllegalStateException { synchronized (mStateLock) { if (mState != STATE_INITIALIZED) { @@ -1095,6 +1168,9 @@ public class AudioEffect { } } + /** + * @hide + */ public void checkStatus(int status) { switch (status) { case AudioEffect.SUCCESS: @@ -1110,11 +1186,17 @@ public class AudioEffect { } } + /** + * @hide + */ public int byteArrayToInt(byte[] valueBuf) { return byteArrayToInt(valueBuf, 0); } + /** + * @hide + */ public int byteArrayToInt(byte[] valueBuf, int offset) { ByteBuffer converter = ByteBuffer.wrap(valueBuf); converter.order(ByteOrder.nativeOrder()); @@ -1122,6 +1204,9 @@ public class AudioEffect { } + /** + * @hide + */ public byte[] intToByteArray(int value) { ByteBuffer converter = ByteBuffer.allocate(4); converter.order(ByteOrder.nativeOrder()); @@ -1129,10 +1214,16 @@ public class AudioEffect { return converter.array(); } + /** + * @hide + */ public short byteArrayToShort(byte[] valueBuf) { return byteArrayToShort(valueBuf, 0); } + /** + * @hide + */ public short byteArrayToShort(byte[] valueBuf, int offset) { ByteBuffer converter = ByteBuffer.wrap(valueBuf); converter.order(ByteOrder.nativeOrder()); @@ -1140,6 +1231,9 @@ public class AudioEffect { } + /** + * @hide + */ public byte[] shortToByteArray(short value) { ByteBuffer converter = ByteBuffer.allocate(2); converter.order(ByteOrder.nativeOrder()); @@ -1148,6 +1242,9 @@ public class AudioEffect { return converter.array(); } + /** + * @hide + */ public byte[] concatArrays(byte[]... arrays) { int len = 0; for (byte[] a : arrays) { @@ -1162,5 +1259,4 @@ public class AudioEffect { } return b; } - } diff --git a/media/java/android/media/BassBoost.java b/media/java/android/media/audiofx/BassBoost.java similarity index 94% rename from media/java/android/media/BassBoost.java rename to media/java/android/media/audiofx/BassBoost.java index 476b0562ed42f..ca55f0f822bdc 100644 --- a/media/java/android/media/BassBoost.java +++ b/media/java/android/media/audiofx/BassBoost.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package android.media; +package android.media.audiofx; import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.media.AudioEffect; +import android.media.audiofx.AudioEffect; import android.os.Bundle; import android.util.Log; @@ -32,15 +32,19 @@ import java.util.StringTokenizer; /** * Bass boost is an audio effect to boost or amplify low frequencies of the sound. It is comparable * to a simple equalizer but limited to one band amplification in the low frequency range. - *
An application creates a BassBoost object to instantiate and control a bass boost engine - * in the audio framework. + *
An application creates a BassBoost object to instantiate and control a bass boost engine in + * the audio framework. *
The methods, parameter types and units exposed by the BassBoost implementation are directly * mapping those defined by the OpenSL ES 1.0.1 Specification (http://www.khronos.org/opensles/) * for the SLBassBoostItf interface. Please refer to this specification for more details. *
To attach the BassBoost to a particular AudioTrack or MediaPlayer, specify the audio session - * ID of this AudioTrack or MediaPlayer when constructing the BassBoost. If the audio session ID 0 - * is specified, the BassBoost applies to the main audio output mix. - *
See {@link android.media.AudioEffect} class for more details on controlling audio effects. + * ID of this AudioTrack or MediaPlayer when constructing the BassBoost. + * If the audio session ID 0 is specified, the BassBoost applies to the main audio output mix. + *
Creating a BassBoost on the output mix (audio session 0) requires permission + * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS} + *
See {@link android.media.MediaPlayer#getAudioSessionId()} for details on audio sessions. + *
See {@link android.media.audiofx.AudioEffect} class for more details on + * controlling audio effects. */ public class BassBoost extends AudioEffect { @@ -55,7 +59,7 @@ public class BassBoost extends AudioEffect { public static final int PARAM_STRENGTH_SUPPORTED = 0; /** * Bass boost effect strength. Parameter ID for - * {@link android.media.BassBoost.OnParameterChangeListener} + * {@link android.media.audiofx.BassBoost.OnParameterChangeListener} */ public static final int PARAM_STRENGTH = 1; @@ -155,7 +159,6 @@ public class BassBoost extends AudioEffect { * BassBoost engine. * @param effect the BassBoost on which the interface is registered. * @param status status of the set parameter operation. - * See {@link android.media.AudioEffect#setParameter(byte[], byte[])}. * @param param ID of the modified parameter. See {@link #PARAM_STRENGTH} ... * @param value the new parameter value. */ diff --git a/media/java/android/media/EnvironmentalReverb.java b/media/java/android/media/audiofx/EnvironmentalReverb.java similarity index 97% rename from media/java/android/media/EnvironmentalReverb.java rename to media/java/android/media/audiofx/EnvironmentalReverb.java index b50febce5d001..f1f582ed3c9d7 100644 --- a/media/java/android/media/EnvironmentalReverb.java +++ b/media/java/android/media/audiofx/EnvironmentalReverb.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package android.media; +package android.media.audiofx; import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.media.AudioEffect; +import android.media.audiofx.AudioEffect; import android.os.Bundle; import android.util.Log; @@ -28,18 +28,18 @@ import java.nio.ByteBuffer; import java.util.StringTokenizer; /** - * A sound generated within a room travels in many directions. The listener first hears the - * direct sound from the source itself. Later, he or she hears discrete echoes caused by sound - * bouncing off nearby walls, the ceiling and the floor. As sound waves arrive after - * undergoing more and more reflections, individual reflections become indistinguishable and - * the listener hears continuous reverberation that decays over time. + * A sound generated within a room travels in many directions. The listener first hears the direct + * sound from the source itself. Later, he or she hears discrete echoes caused by sound bouncing off + * nearby walls, the ceiling and the floor. As sound waves arrive after undergoing more and more + * reflections, individual reflections become indistinguishable and the listener hears continuous + * reverberation that decays over time. * Reverb is vital for modeling a listener's environment. It can be used in music applications * to simulate music being played back in various environments, or in games to immerse the * listener within the game's environment. * The EnvironmentalReverb class allows an application to control each reverb engine property in a * global reverb environment and is more suitable for games. For basic control, more suitable for * music applications, it is recommended to use the - * {@link android.media.PresetReverb} class. + * {@link android.media.audiofx.PresetReverb} class. *
An application creates a EnvironmentalReverb object to instantiate and control a reverb engine * in the audio framework. *
The methods, parameter types and units exposed by the EnvironmentalReverb implementation are @@ -51,7 +51,9 @@ import java.util.StringTokenizer; * they must be explicitely attached to it and a send level must be specified. Use the effect ID * returned by getId() method to designate this particular effect when attaching it to the * MediaPlayer or AudioTrack. - *
See {@link android.media.AudioEffect} class for more details on controlling + *
Creating a reverb on the output mix (audio session 0) requires permission + * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS} + *
See {@link android.media.audiofx.AudioEffect} class for more details on controlling * audio effects. */ @@ -76,7 +78,7 @@ public class EnvironmentalReverb extends AudioEffect { public static final int PARAM_DECAY_TIME = 2; /** * Decay HF ratio. Parameter ID for - * {@link android.media.EnvironmentalReverb.OnParameterChangeListener} + * {@link android.media.audiofx.EnvironmentalReverb.OnParameterChangeListener} */ public static final int PARAM_DECAY_HF_RATIO = 3; /** @@ -444,7 +446,6 @@ public class EnvironmentalReverb extends AudioEffect { * EnvironmentalReverb engine. * @param effect the EnvironmentalReverb on which the interface is registered. * @param status status of the set parameter operation. - * See {@link android.media.AudioEffect#setParameter(byte[], byte[])}. * @param param ID of the modified parameter. See {@link #PARAM_ROOM_LEVEL} ... * @param value the new parameter value. */ diff --git a/media/java/android/media/Equalizer.java b/media/java/android/media/audiofx/Equalizer.java similarity index 97% rename from media/java/android/media/Equalizer.java rename to media/java/android/media/audiofx/Equalizer.java index 6fa48c574ce07..b3bafa9149788 100644 --- a/media/java/android/media/Equalizer.java +++ b/media/java/android/media/audiofx/Equalizer.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package android.media; +package android.media.audiofx; import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.media.AudioEffect; +import android.media.audiofx.AudioEffect; import android.os.Bundle; import android.util.Log; @@ -41,7 +41,11 @@ import java.util.StringTokenizer; *
To attach the Equalizer to a particular AudioTrack or MediaPlayer, specify the audio session * ID of this AudioTrack or MediaPlayer when constructing the Equalizer. If the audio session ID 0 * is specified, the Equalizer applies to the main audio output mix. - *
See {@link android.media.AudioEffect} class for more details on controlling audio effects. + *
Creating an Equalizer on the output mix (audio session 0) requires permission + * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS} + *
See {@link android.media.MediaPlayer#getAudioSessionId()} for details on audio sessions. + *
See {@link android.media.audiofx.AudioEffect} class for more details on controlling audio + * effects. */ public class Equalizer extends AudioEffect { @@ -68,7 +72,7 @@ public class Equalizer extends AudioEffect { public static final int PARAM_CENTER_FREQ = 3; /** * Band frequency range. Parameter ID for - * {@link android.media.Equalizer.OnParameterChangeListener} + * {@link android.media.audiofx.Equalizer.OnParameterChangeListener} */ public static final int PARAM_BAND_FREQ_RANGE = 4; /** @@ -380,7 +384,6 @@ public class Equalizer extends AudioEffect { * Equalizer engine. * @param effect the Equalizer on which the interface is registered. * @param status status of the set parameter operation. - * See {@link android.media.AudioEffect#setParameter(byte[], byte[])}. * @param param1 ID of the modified parameter. See {@link #PARAM_BAND_LEVEL} ... * @param param2 additional parameter qualifier (e.g the band for band level parameter). * @param value the new parameter value. diff --git a/media/java/android/media/PresetReverb.java b/media/java/android/media/audiofx/PresetReverb.java similarity index 96% rename from media/java/android/media/PresetReverb.java rename to media/java/android/media/audiofx/PresetReverb.java index 65175ffdb7227..7a89ae7d38a96 100644 --- a/media/java/android/media/PresetReverb.java +++ b/media/java/android/media/audiofx/PresetReverb.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package android.media; +package android.media.audiofx; import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.media.AudioEffect; +import android.media.audiofx.AudioEffect; import android.os.Bundle; import android.util.Log; @@ -40,7 +40,7 @@ import java.util.StringTokenizer; * The PresetReverb class allows an application to configure the global reverb using a reverb preset. * This is primarily used for adding some reverb in a music playback context. Applications * requiring control over a more advanced environmental reverb are advised to use the - * {@link android.media.EnvironmentalReverb} class. + * {@link android.media.audiofx.EnvironmentalReverb} class. *
An application creates a PresetReverb object to instantiate and control a reverb engine in the * audio framework. *
The methods, parameter types and units exposed by the PresetReverb implementation are @@ -52,7 +52,10 @@ import java.util.StringTokenizer; * they must be explicitely attached to it and a send level must be specified. Use the effect ID * returned by getId() method to designate this particular effect when attaching it to the * MediaPlayer or AudioTrack. - *
See {@link android.media.AudioEffect} class for more details on controlling audio effects. + *
Creating a reverb on the output mix (audio session 0) requires permission + * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS} + *
See {@link android.media.audiofx.AudioEffect} class for more details on controlling + * audio effects. */ public class PresetReverb extends AudioEffect { @@ -64,7 +67,7 @@ public class PresetReverb extends AudioEffect { /** * Preset. Parameter ID for - * {@link android.media.PresetReverb.OnParameterChangeListener} + * {@link android.media.audiofx.PresetReverb.OnParameterChangeListener} */ public static final int PARAM_PRESET = 0; @@ -174,7 +177,6 @@ public class PresetReverb extends AudioEffect { * PresetReverb engine. * @param effect the PresetReverb on which the interface is registered. * @param status status of the set parameter operation. - * See {@link android.media.AudioEffect#setParameter(byte[], byte[])}. * @param param ID of the modified parameter. See {@link #PARAM_PRESET} ... * @param value the new parameter value. */ diff --git a/media/java/android/media/Virtualizer.java b/media/java/android/media/audiofx/Virtualizer.java similarity index 95% rename from media/java/android/media/Virtualizer.java rename to media/java/android/media/audiofx/Virtualizer.java index b08f36e5d8e33..a682a45df5d07 100644 --- a/media/java/android/media/Virtualizer.java +++ b/media/java/android/media/audiofx/Virtualizer.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package android.media; +package android.media.audiofx; import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.media.AudioEffect; +import android.media.audiofx.AudioEffect; import android.os.Bundle; import android.util.Log; @@ -42,7 +42,11 @@ import java.util.StringTokenizer; *
To attach the Virtualizer to a particular AudioTrack or MediaPlayer, specify the audio session * ID of this AudioTrack or MediaPlayer when constructing the Virtualizer. If the audio session ID 0 * is specified, the Virtualizer applies to the main audio output mix. - *
See {@link android.media.AudioEffect} class for more details on controlling audio effects. + *
Creating a Virtualizer on the output mix (audio session 0) requires permission + * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS} + *
See {@link android.media.MediaPlayer#getAudioSessionId()} for details on audio sessions. + *
See {@link android.media.audiofx.AudioEffect} class for more details on controlling
+ * audio effects.
*/
public class Virtualizer extends AudioEffect {
@@ -56,7 +60,7 @@ public class Virtualizer extends AudioEffect {
public static final int PARAM_STRENGTH_SUPPORTED = 0;
/**
* Virtualizer effect strength. Parameter ID for
- * {@link android.media.Virtualizer.OnParameterChangeListener}
+ * {@link android.media.audiofx.Virtualizer.OnParameterChangeListener}
*/
public static final int PARAM_STRENGTH = 1;
@@ -156,7 +160,6 @@ public class Virtualizer extends AudioEffect {
* Virtualizer engine.
* @param effect the Virtualizer on which the interface is registered.
* @param status status of the set parameter operation.
- * See {@link android.media.AudioEffect#setParameter(byte[], byte[])}.
* @param param ID of the modified parameter. See {@link #PARAM_STRENGTH} ...
* @param value the new parameter value.
*/
diff --git a/media/java/android/media/Visualizer.java b/media/java/android/media/audiofx/Visualizer.java
similarity index 98%
rename from media/java/android/media/Visualizer.java
rename to media/java/android/media/audiofx/Visualizer.java
index 33222ffc91d8c..0c48556d97661 100755
--- a/media/java/android/media/Visualizer.java
+++ b/media/java/android/media/audiofx/Visualizer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.media;
+package android.media.audiofx;
import android.util.Log;
import java.lang.ref.WeakReference;
@@ -32,8 +32,8 @@ import android.os.Message;
* visualized:
*
Two types of representation of audio content can be captured:
@@ -57,6 +57,8 @@ import android.os.Message;
* When data capture is not needed any more, the Visualizer should be disabled.
*
It is good practice to call the {@link #release()} method when the Visualizer is not used * anymore to free up native resources associated to the Visualizer instance. + *
Creating a Visualizer on the output mix (audio session 0) requires permission + * {@link android.Manifest.permission#MODIFY_AUDIO_SETTINGS} */ public class Visualizer { diff --git a/media/java/android/media/audiofx/package.html b/media/java/android/media/audiofx/package.html new file mode 100644 index 0000000000000..c6e4892f801fb --- /dev/null +++ b/media/java/android/media/audiofx/package.html @@ -0,0 +1,5 @@ + +
+Provides classes that manage audio effects implemented in the media framework. + + diff --git a/media/jni/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp index 8d9f4fee41073..b16372d54de55 100644 --- a/media/jni/audioeffect/android_media_AudioEffect.cpp +++ b/media/jni/audioeffect/android_media_AudioEffect.cpp @@ -37,7 +37,7 @@ using namespace android; #define AUDIOEFFECT_ERROR_DEAD_OBJECT -7 // ---------------------------------------------------------------------------- -static const char* const kClassPathName = "android/media/AudioEffect"; +static const char* const kClassPathName = "android/media/audiofx/AudioEffect"; struct fields_t { // these fields provide access from C++ to the... @@ -228,9 +228,9 @@ android_media_AudioEffect_native_init(JNIEnv *env) return; } - clazz = env->FindClass("android/media/AudioEffect$Descriptor"); + clazz = env->FindClass("android/media/audiofx/AudioEffect$Descriptor"); if (clazz == NULL) { - LOGE("Can't find android/media/AudioEffect$Descriptor class"); + LOGE("Can't find android/media/audiofx/AudioEffect$Descriptor class"); return; } fields.clazzDesc = (jclass)env->NewGlobalRef(clazz); @@ -241,7 +241,7 @@ android_media_AudioEffect_native_init(JNIEnv *env) "