summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2015-04-14 14:41:06 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2015-04-14 15:10:30 -0700
commitcc98c67ef7f1548766e0b742eb041579e74ba225 (patch)
tree3be91744ba1935b1bcd8b774d3babdaaa89b039b /media
parent564eb45b0084318c76e0f69bd986036fab7688c8 (diff)
downloadframeworks_base-cc98c67ef7f1548766e0b742eb041579e74ba225.zip
frameworks_base-cc98c67ef7f1548766e0b742eb041579e74ba225.tar.gz
frameworks_base-cc98c67ef7f1548766e0b742eb041579e74ba225.tar.bz2
Define AudioMix state constants
Bug 20226914 Change-Id: Ie513fcdaaffd4ae3ed7fbd8d24fe8683959739e3
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/audiopolicy/AudioMix.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/media/java/android/media/audiopolicy/AudioMix.java b/media/java/android/media/audiopolicy/AudioMix.java
index 1806662..6aa4d8a 100644
--- a/media/java/android/media/audiopolicy/AudioMix.java
+++ b/media/java/android/media/audiopolicy/AudioMix.java
@@ -36,6 +36,7 @@ public class AudioMix {
private int mRouteFlags;
private String mRegistrationId;
private int mMixType = MIX_TYPE_INVALID;
+ private int mMixState = MIX_STATE_DISABLED;
/**
* All parameters are guaranteed valid through the Builder.
@@ -48,6 +49,7 @@ public class AudioMix {
mMixType = rule.getTargetMixType();
}
+ // ROUTE_FLAG_* values to keep in sync with frameworks/av/include/media/AudioPolicy.h
/**
* An audio mix behavior where the output of the mix is sent to the original destination of
* the audio signal, i.e. an output device for an output mix, or a recording for an input mix.
@@ -62,6 +64,7 @@ public class AudioMix {
@SystemApi
public static final int ROUTE_FLAG_LOOP_BACK = 0x1 << 1;
+ // MIX_TYPE_* values to keep in sync with frameworks/av/include/media/AudioPolicy.h
/**
* @hide
* Invalid mix type, default value.
@@ -78,6 +81,39 @@ public class AudioMix {
*/
public static final int MIX_TYPE_RECORDERS = 1;
+
+ // MIX_STATE_* values to keep in sync with frameworks/av/include/media/AudioPolicy.h
+ /**
+ * @hide
+ * State of a mix before its policy is enabled.
+ */
+ @SystemApi
+ public static final int MIX_STATE_DISABLED = -1;
+ /**
+ * @hide
+ * State of a mix when there is no audio to mix.
+ */
+ @SystemApi
+ public static final int MIX_STATE_IDLE = 0;
+ /**
+ * @hide
+ * State of a mix that is actively mixing audio.
+ */
+ @SystemApi
+ public static final int MIX_STATE_MIXING = 1;
+
+ /**
+ * @hide
+ * The current mixing state.
+ * @return one of {@link #MIX_STATE_DISABLED}, {@link #MIX_STATE_IDLE},
+ * {@link #MIX_STATE_MIXING}.
+ */
+ @SystemApi
+ public int getMixState() {
+ return mMixState;
+ }
+
+
int getRouteFlags() {
return mRouteFlags;
}