diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2011-07-24 16:25:38 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2011-07-24 16:25:38 -0700 |
commit | ff7656c9de4e6ca0ec13da2b99593be71dcfd796 (patch) | |
tree | 26771e74fc926870770b10845c6698498e9b472c | |
parent | d40e2c67ed6423355aeb1292b33c2f8a20b3c84d (diff) | |
download | frameworks_base-ff7656c9de4e6ca0ec13da2b99593be71dcfd796.zip frameworks_base-ff7656c9de4e6ca0ec13da2b99593be71dcfd796.tar.gz frameworks_base-ff7656c9de4e6ca0ec13da2b99593be71dcfd796.tar.bz2 |
Fix bug 4211099 channel constants and 7.1 mask
Add definitions for the side and elevated channels.
Add new (correct) definition for 7.1 mask which uses
the side channels rather than the front half-pan channels.
Change-Id: I13d93f99f3b453ce2ab5fdc2da66629ed7f337ef
-rw-r--r-- | media/java/android/media/AudioFormat.java | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java index 31e4631..82e8d77 100644 --- a/media/java/android/media/AudioFormat.java +++ b/media/java/android/media/AudioFormat.java @@ -54,7 +54,8 @@ public class AudioFormat { /** Default audio channel mask */ public static final int CHANNEL_OUT_DEFAULT = 1; - // Channel mask definitions must be kept in sync with native values in include/media/AudioSystem.h + // Channel mask definitions must be kept in sync with native values + // in /system/core/include/system/audio.h public static final int CHANNEL_OUT_FRONT_LEFT = 0x4; public static final int CHANNEL_OUT_FRONT_RIGHT = 0x8; public static final int CHANNEL_OUT_FRONT_CENTER = 0x10; @@ -64,6 +65,25 @@ public class AudioFormat { public static final int CHANNEL_OUT_FRONT_LEFT_OF_CENTER = 0x100; public static final int CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 0x200; public static final int CHANNEL_OUT_BACK_CENTER = 0x400; + /** @hide */ + public static final int CHANNEL_OUT_SIDE_LEFT = 0x800; + /** @hide */ + public static final int CHANNEL_OUT_SIDE_RIGHT = 0x1000; + /** @hide */ + public static final int CHANNEL_OUT_TOP_CENTER = 0x2000; + /** @hide */ + public static final int CHANNEL_OUT_TOP_FRONT_LEFT = 0x4000; + /** @hide */ + public static final int CHANNEL_OUT_TOP_FRONT_CENTER = 0x8000; + /** @hide */ + public static final int CHANNEL_OUT_TOP_FRONT_RIGHT = 0x10000; + /** @hide */ + public static final int CHANNEL_OUT_TOP_BACK_LEFT = 0x20000; + /** @hide */ + public static final int CHANNEL_OUT_TOP_BACK_CENTER = 0x40000; + /** @hide */ + public static final int CHANNEL_OUT_TOP_BACK_RIGHT = 0x80000; + public static final int CHANNEL_OUT_MONO = CHANNEL_OUT_FRONT_LEFT; public static final int CHANNEL_OUT_STEREO = (CHANNEL_OUT_FRONT_LEFT | CHANNEL_OUT_FRONT_RIGHT); public static final int CHANNEL_OUT_QUAD = (CHANNEL_OUT_FRONT_LEFT | CHANNEL_OUT_FRONT_RIGHT | @@ -75,6 +95,12 @@ public class AudioFormat { public static final int CHANNEL_OUT_7POINT1 = (CHANNEL_OUT_FRONT_LEFT | CHANNEL_OUT_FRONT_RIGHT | CHANNEL_OUT_FRONT_CENTER | CHANNEL_OUT_LOW_FREQUENCY | CHANNEL_OUT_BACK_LEFT | CHANNEL_OUT_BACK_RIGHT | CHANNEL_OUT_FRONT_LEFT_OF_CENTER | CHANNEL_OUT_FRONT_RIGHT_OF_CENTER); + /** @hide */ + public static final int CHANNEL_OUT_7POINT1_SURROUND = ( + CHANNEL_OUT_FRONT_LEFT | CHANNEL_OUT_FRONT_CENTER | CHANNEL_OUT_FRONT_RIGHT | + CHANNEL_OUT_SIDE_LEFT | CHANNEL_OUT_SIDE_RIGHT | + CHANNEL_OUT_BACK_LEFT | CHANNEL_OUT_BACK_RIGHT | + CHANNEL_OUT_LOW_FREQUENCY); public static final int CHANNEL_IN_DEFAULT = 1; public static final int CHANNEL_IN_LEFT = 0x4; |