Commit 761b8137 by Oliver Woodman

Use API level 23 constants.

parent 72f093c4
......@@ -70,19 +70,24 @@ public final class C {
@SuppressWarnings("InlinedApi")
public static final int ENCODING_E_AC3 = AudioFormat.ENCODING_E_AC3;
// TODO: Switch these constants to use AudioFormat fields when the target API version is >= 23.
// The inlined values here are for NVIDIA Shield devices which support DTS on earlier versions.
public static final int ENCODING_DTS = 7;
public static final int ENCODING_DTS_HD = 8;
/**
* @see AudioFormat#ENCODING_DTS
*/
@SuppressWarnings("InlinedApi")
public static final int ENCODING_DTS = AudioFormat.ENCODING_DTS;
/**
* @see AudioFormat#ENCODING_DTS_HD
*/
@SuppressWarnings("InlinedApi")
public static final int ENCODING_DTS_HD = AudioFormat.ENCODING_DTS_HD;
// TODO: Change 6396 to AudioFormat.CHANNEL_OUT_7POINT1_SURROUND when the target API version is
// >= 23.
/**
* @see AudioFormat#CHANNEL_OUT_7POINT1_SURROUND
*/
@SuppressWarnings({"InlinedApi", "deprecation"})
public static final int CHANNEL_OUT_7POINT1_SURROUND = Util.SDK_INT < 23
? AudioFormat.CHANNEL_OUT_7POINT1 : 6396;
? AudioFormat.CHANNEL_OUT_7POINT1 : AudioFormat.CHANNEL_OUT_7POINT1_SURROUND;
/**
* @see MediaExtractor#SAMPLE_FLAG_SYNC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment