Commit e6ce6764 by andrewlewis Committed by Oliver Woodman

Clean up DefaultAudioSink

This is a first step towards factoring out position tracking functionality.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189027731
parent 0b182d18
......@@ -942,6 +942,20 @@ public final class Util {
}
/**
* Returns whether {@code encoding} is one of the PCM encodings.
*
* @param encoding The encoding of the audio data.
* @return Whether the encoding is one of the PCM encodings.
*/
public static boolean isEncodingPcm(@C.Encoding int encoding) {
return encoding == C.ENCODING_PCM_8BIT
|| encoding == C.ENCODING_PCM_16BIT
|| encoding == C.ENCODING_PCM_24BIT
|| encoding == C.ENCODING_PCM_32BIT
|| encoding == C.ENCODING_PCM_FLOAT;
}
/**
* Returns whether {@code encoding} is high resolution (> 16-bit) integer PCM.
*
* @param encoding The encoding of the audio data.
......
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