Loading core/jni/android_media_AudioFormat.h +3 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ // keep these values in sync with AudioFormat.java #define ENCODING_PCM_16BIT 2 #define ENCODING_PCM_8BIT 3 #define ENCODING_PCM_FLOAT 4 static inline audio_format_t audioFormatToNative(int audioFormat) { Loading @@ -30,6 +31,8 @@ static inline audio_format_t audioFormatToNative(int audioFormat) return AUDIO_FORMAT_PCM_16_BIT; case ENCODING_PCM_8BIT: return AUDIO_FORMAT_PCM_8_BIT; case ENCODING_PCM_FLOAT: return AUDIO_FORMAT_PCM_FLOAT; default: return AUDIO_FORMAT_INVALID; } Loading media/java/android/media/AudioFormat.java +3 −1 Original line number Diff line number Diff line Loading @@ -32,11 +32,13 @@ public class AudioFormat { /** Default audio data format */ public static final int ENCODING_DEFAULT = 1; // These two values must be kept in sync with core/jni/android_media_AudioFormat.h // These values must be kept in sync with core/jni/android_media_AudioFormat.h /** Audio data format: PCM 16 bit per sample. Guaranteed to be supported by devices. */ public static final int ENCODING_PCM_16BIT = 2; /** Audio data format: PCM 8 bit per sample. Not guaranteed to be supported by devices. */ public static final int ENCODING_PCM_8BIT = 3; /** @hide Candidate for public API */ public static final int ENCODING_PCM_FLOAT = 4; /** Invalid audio channel configuration */ /** @deprecated use CHANNEL_INVALID instead */ Loading Loading
core/jni/android_media_AudioFormat.h +3 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ // keep these values in sync with AudioFormat.java #define ENCODING_PCM_16BIT 2 #define ENCODING_PCM_8BIT 3 #define ENCODING_PCM_FLOAT 4 static inline audio_format_t audioFormatToNative(int audioFormat) { Loading @@ -30,6 +31,8 @@ static inline audio_format_t audioFormatToNative(int audioFormat) return AUDIO_FORMAT_PCM_16_BIT; case ENCODING_PCM_8BIT: return AUDIO_FORMAT_PCM_8_BIT; case ENCODING_PCM_FLOAT: return AUDIO_FORMAT_PCM_FLOAT; default: return AUDIO_FORMAT_INVALID; } Loading
media/java/android/media/AudioFormat.java +3 −1 Original line number Diff line number Diff line Loading @@ -32,11 +32,13 @@ public class AudioFormat { /** Default audio data format */ public static final int ENCODING_DEFAULT = 1; // These two values must be kept in sync with core/jni/android_media_AudioFormat.h // These values must be kept in sync with core/jni/android_media_AudioFormat.h /** Audio data format: PCM 16 bit per sample. Guaranteed to be supported by devices. */ public static final int ENCODING_PCM_16BIT = 2; /** Audio data format: PCM 8 bit per sample. Not guaranteed to be supported by devices. */ public static final int ENCODING_PCM_8BIT = 3; /** @hide Candidate for public API */ public static final int ENCODING_PCM_FLOAT = 4; /** Invalid audio channel configuration */ /** @deprecated use CHANNEL_INVALID instead */ Loading