Class WavUtil
- java.lang.Object
-
- com.google.android.exoplayer2.audio.WavUtil
-
@Deprecated public final class WavUtil extends Object
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Utilities for handling WAVE files.
-
-
Field Summary
Fields Modifier and Type Field Description static intDATA_FOURCCDeprecated.Four character code for "data".static intDS64_FOURCCDeprecated.Four character code for "ds64".static intFMT_FOURCCDeprecated.Four character code for "fmt ".static intRF64_FOURCCDeprecated.Four character code for "RF64".static intRIFF_FOURCCDeprecated.Four character code for "RIFF".static intTYPE_ALAWDeprecated.WAVE type value for 8-bit ITU-T G.711 A-law audio data.static intTYPE_FLOATDeprecated.WAVE type value for float PCM audio data.static intTYPE_IMA_ADPCMDeprecated.WAVE type value for IMA ADPCM audio data.static intTYPE_MLAWDeprecated.WAVE type value for 8-bit ITU-T G.711 mu-law audio data.static intTYPE_PCMDeprecated.WAVE type value for integer PCM audio data.static intTYPE_WAVE_FORMAT_EXTENSIBLEDeprecated.WAVE type value for extended WAVE format.static intWAVE_FOURCCDeprecated.Four character code for "WAVE".
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static @com.google.android.exoplayer2.C.PcmEncoding intgetPcmEncodingForType(int type, int bitsPerSample)Deprecated.Returns theC.PcmEncodingfor the given WAVE format type value, orC.ENCODING_INVALIDif the type is not a known PCM type.static intgetTypeForPcmEncoding(@com.google.android.exoplayer2.C.PcmEncoding int pcmEncoding)Deprecated.Returns the WAVE format type value for the givenC.PcmEncoding.
-
-
-
Field Detail
-
RIFF_FOURCC
public static final int RIFF_FOURCC
Deprecated.Four character code for "RIFF".- See Also:
- Constant Field Values
-
WAVE_FOURCC
public static final int WAVE_FOURCC
Deprecated.Four character code for "WAVE".- See Also:
- Constant Field Values
-
FMT_FOURCC
public static final int FMT_FOURCC
Deprecated.Four character code for "fmt ".- See Also:
- Constant Field Values
-
DATA_FOURCC
public static final int DATA_FOURCC
Deprecated.Four character code for "data".- See Also:
- Constant Field Values
-
RF64_FOURCC
public static final int RF64_FOURCC
Deprecated.Four character code for "RF64".- See Also:
- Constant Field Values
-
DS64_FOURCC
public static final int DS64_FOURCC
Deprecated.Four character code for "ds64".- See Also:
- Constant Field Values
-
TYPE_PCM
public static final int TYPE_PCM
Deprecated.WAVE type value for integer PCM audio data.- See Also:
- Constant Field Values
-
TYPE_FLOAT
public static final int TYPE_FLOAT
Deprecated.WAVE type value for float PCM audio data.- See Also:
- Constant Field Values
-
TYPE_ALAW
public static final int TYPE_ALAW
Deprecated.WAVE type value for 8-bit ITU-T G.711 A-law audio data.- See Also:
- Constant Field Values
-
TYPE_MLAW
public static final int TYPE_MLAW
Deprecated.WAVE type value for 8-bit ITU-T G.711 mu-law audio data.- See Also:
- Constant Field Values
-
TYPE_IMA_ADPCM
public static final int TYPE_IMA_ADPCM
Deprecated.WAVE type value for IMA ADPCM audio data.- See Also:
- Constant Field Values
-
TYPE_WAVE_FORMAT_EXTENSIBLE
public static final int TYPE_WAVE_FORMAT_EXTENSIBLE
Deprecated.WAVE type value for extended WAVE format.- See Also:
- Constant Field Values
-
-
Method Detail
-
getTypeForPcmEncoding
public static int getTypeForPcmEncoding(@com.google.android.exoplayer2.C.PcmEncoding int pcmEncoding)
Deprecated.Returns the WAVE format type value for the givenC.PcmEncoding.- Parameters:
pcmEncoding- TheC.PcmEncodingvalue.- Returns:
- The corresponding WAVE format type.
- Throws:
IllegalArgumentException- IfpcmEncodingis not aC.PcmEncoding, or if it'sC.ENCODING_INVALIDorFormat.NO_VALUE.
-
getPcmEncodingForType
public static @com.google.android.exoplayer2.C.PcmEncoding int getPcmEncodingForType(int type, int bitsPerSample)Deprecated.Returns theC.PcmEncodingfor the given WAVE format type value, orC.ENCODING_INVALIDif the type is not a known PCM type.
-
-