APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.media.jfxmedia.track

public Class AudioTrack

extends Track
Class Inheritance
Imports
java.lang.annotation.Native, java.util.Locale, com.sun.media.jfxmedia.Media

A class representing an audio track in a media.
See Also
Media

Field Summary

Modifier and TypeField and Description
private int
private float
public static final int
FRONT_CENTER

Channel mask bit indicating the presence of a front center channel.

public static final int
FRONT_LEFT

Channel mask bit indicating the presence of a front left channel.

public static final int
FRONT_RIGHT

Channel mask bit indicating the presence of a front right channel.

private int
public static final int
REAR_CENTER

Channel mask bit indicating the presence of a rear center channel.

public static final int
REAR_LEFT

Channel mask bit indicating the presence of a rear left channel.

public static final int
REAR_RIGHT

Channel mask bit indicating the presence of a rear right channel.

public static final int
UNKNOWN

Channel mask bit indicating the absence of any channel

Constructor Summary

AccessConstructor and Description
public
AudioTrack(boolean
Whether this track is enabled by default or not (if the container supports it)
enabled
,
long
A unique identifier for this track
trackID
,
String
The name of the track.
name
,
Locale
The language information for the track.
locale
,
Track.Encoding
The encoding of the track.
encoding
,
int
The number of audio channels in the track.
numChannels
,
int
The channel mask of the track.
channelMask
,
float
The encoded sample rate in samples per second.
encodedSampleRate
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The channel mask.
getChannelMask
()

Retrieve the channel mask of the track.

public float

Returns:

The sample rate.
getEncodedSampleRate
()

Retrieve the encoded sample rate.

public int

Returns:

The number of channels.
getNumChannels
()

Retrieve the number of audio channels in the track.

public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from com.sun.media.jfxmedia.track.Track:
getEncodingTypegetLocalegetNamegetTrackIDisEnabled

Field Detail

channelMaskback to summary
private int channelMask
encodedSampleRateback to summary
private float encodedSampleRate
FRONT_CENTERback to summary
public static final int FRONT_CENTER

Channel mask bit indicating the presence of a front center channel.

Annotations
@Native
FRONT_LEFTback to summary
public static final int FRONT_LEFT

Channel mask bit indicating the presence of a front left channel.

Annotations
@Native
FRONT_RIGHTback to summary
public static final int FRONT_RIGHT

Channel mask bit indicating the presence of a front right channel.

Annotations
@Native
numChannelsback to summary
private int numChannels
REAR_CENTERback to summary
public static final int REAR_CENTER

Channel mask bit indicating the presence of a rear center channel.

Annotations
@Native
REAR_LEFTback to summary
public static final int REAR_LEFT

Channel mask bit indicating the presence of a rear left channel.

Annotations
@Native
REAR_RIGHTback to summary
public static final int REAR_RIGHT

Channel mask bit indicating the presence of a rear right channel.

Annotations
@Native
UNKNOWNback to summary
public static final int UNKNOWN

Channel mask bit indicating the absence of any channel

Annotations
@Native

Constructor Detail

AudioTrackback to summary
public AudioTrack(boolean enabled, long trackID, String name, Locale locale, Track.Encoding encoding, int numChannels, int channelMask, float encodedSampleRate)

Constructor.

Parameters
enabled:boolean

Whether this track is enabled by default or not (if the container supports it)

trackID:long

A unique identifier for this track

name:String

The name of the track.

locale:Locale

The language information for the track.

encoding:Track.Encoding

The encoding of the track.

numChannels:int

The number of audio channels in the track.

channelMask:int

The channel mask of the track.

encodedSampleRate:float

The encoded sample rate in samples per second.

Exceptions
IllegalArgumentException:
  • if name or encoding is null.
  • if numChannels < 1.
  • if encodedSampleRate ≤ 0.0.

Method Detail

getChannelMaskback to summary
public int getChannelMask()

Retrieve the channel mask of the track.

Returns:int

The channel mask.

getEncodedSampleRateback to summary
public float getEncodedSampleRate()

Retrieve the encoded sample rate.

Returns:float

The sample rate.

getNumChannelsback to summary
public int getNumChannels()

Retrieve the number of audio channels in the track.

Returns:int

The number of channels.

toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override