Track.Encoding
Modifier and Type | Field and Description |
---|---|
static int |
FRONT_CENTER
Channel mask bit indicating the presence of a front center channel.
|
static int |
FRONT_LEFT
Channel mask bit indicating the presence of a front left channel.
|
static int |
FRONT_RIGHT
Channel mask bit indicating the presence of a front right channel.
|
static int |
REAR_CENTER
Channel mask bit indicating the presence of a rear center channel.
|
static int |
REAR_LEFT
Channel mask bit indicating the presence of a rear left channel.
|
static int |
REAR_RIGHT
Channel mask bit indicating the presence of a rear right channel.
|
static int |
UNKNOWN
Channel mask bit indicating the absence of any channel
|
Constructor and Description |
---|
AudioTrack(boolean enabled,
long trackID,
String name,
Locale locale,
Track.Encoding encoding,
int numChannels,
int channelMask,
float encodedSampleRate)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getChannelMask()
Retrieve the channel mask of the track.
|
float |
getEncodedSampleRate()
Retrieve the encoded sample rate.
|
int |
getNumChannels()
Retrieve the number of audio channels in the track.
|
String |
toString() |
getEncodingType, getLocale, getName, getTrackID, isEnabled
@Native public static final int UNKNOWN
@Native public static final int FRONT_LEFT
@Native public static final int FRONT_RIGHT
@Native public static final int FRONT_CENTER
@Native public static final int REAR_LEFT
@Native public static final int REAR_RIGHT
@Native public static final int REAR_CENTER
public AudioTrack(boolean enabled, long trackID, String name, Locale locale, Track.Encoding encoding, int numChannels, int channelMask, float encodedSampleRate)
enabled
- Whether this track is enabled by default or not (if the container supports it)trackID
- A unique identifier for this trackname
- The name of the track.encoding
- The encoding of the track.locale
- The language information for the track.numChannels
- The number of audio channels in the track.channelMask
- The channel mask of the track.encodedSampleRate
- The encoded sample rate in samples per second.IllegalArgumentException
- if name
or
encoding
is null
.IllegalArgumentException
- if numChannels < 1
.IllegalArgumentException
- if encodedSampleRate ≤ 0.0
.public int getNumChannels()
public int getChannelMask()
public float getEncodedSampleRate()
Copyright © 2020. All rights reserved.