| Package | Description |
|---|---|
| javax.sound.sampled |
Provides interfaces and classes for capture, processing, and playback of sampled audio data.
|
| javax.sound.sampled.spi |
Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.
|
| Modifier and Type | Field and Description |
|---|---|
protected AudioFormat |
AudioInputStream.format
The format of the audio data contained in the stream.
|
| Modifier and Type | Method and Description |
|---|---|
AudioFormat |
DataLine.getFormat()
Obtains the current format (encoding, sample rate, number of channels, etc.) of the data line's audio data.
|
AudioFormat |
AudioInputStream.getFormat()
Obtains the audio format of the sound data in this audio input stream.
|
AudioFormat |
AudioFileFormat.getFormat()
Obtains the format of the audio data contained in the audio file.
|
AudioFormat |
DataLine.Info.getFormats()
Obtains a set of audio formats supported by the data line.
|
static AudioFormat |
AudioSystem.getTargetFormats(AudioFormat
Obtains the formats that have a particular encoding and that the system can obtain from a stream of the specified format using the set of installed format converters.
|
| Modifier and Type | Method and Description |
|---|---|
static AudioInputStream |
AudioSystem.getAudioInputStream(AudioFormat
Obtains an audio input stream of the indicated format, by converting the provided audio input stream.
|
static SourceDataLine |
AudioSystem.getSourceDataLine(AudioFormat
Obtains a source data line that can be used for playing back audio data in the format specified by the
AudioFormat object.
|
static SourceDataLine |
AudioSystem.getSourceDataLine(AudioFormat
Obtains a source data line that can be used for playing back audio data in the format specified by the
AudioFormat object, provided by the mixer specified by the
Mixer.Info object.
|
static TargetDataLine |
AudioSystem.getTargetDataLine(AudioFormat
Obtains a target data line that can be used for recording audio data in the format specified by the
AudioFormat object.
|
static TargetDataLine |
AudioSystem.getTargetDataLine(AudioFormat
Obtains a target data line that can be used for recording audio data in the format specified by the
AudioFormat object, provided by the mixer specified by the
Mixer.Info object.
|
static AudioFormat |
AudioSystem.getTargetEncodings(AudioFormat
Obtains the encodings that the system can obtain from an audio input stream with the specified format using the set of installed format converters.
|
static AudioFormat |
AudioSystem.getTargetFormats(AudioFormat
Obtains the formats that have a particular encoding and that the system can obtain from a stream of the specified format using the set of installed format converters.
|
static boolean |
AudioSystem.isConversionSupported(AudioFormat
Indicates whether an audio input stream of the specified encoding can be obtained from an audio input stream that has the specified format.
|
static boolean |
AudioSystem.isConversionSupported(AudioFormat
Indicates whether an audio input stream of a specified format can be obtained from an audio input stream of another specified format.
|
boolean |
DataLine.Info.isFormatSupported(AudioFormat
Indicates whether this data line supports a particular audio format.
|
boolean |
AudioFormat.matches(AudioFormat
Indicates whether this format matches the one specified.
|
void |
TargetDataLine.open(AudioFormat
Opens the line with the specified format, causing the line to acquire any required system resources and become operational.
|
void |
SourceDataLine.open(AudioFormat
Opens the line with the specified format, causing the line to acquire any required system resources and become operational.
|
void |
Clip.open(AudioFormat
Opens the clip, meaning that it should acquire any required system resources and become operational.
|
void |
TargetDataLine.open(AudioFormat
Opens the line with the specified format and requested buffer size, causing the line to acquire any required system resources and become operational.
|
void |
SourceDataLine.open(AudioFormat
Opens the line with the specified format and suggested buffer size, causing the line to acquire any required system resources and become operational.
|
| Constructor and Description | |
|---|---|
AudioFileFormat(AudioFileFormat
Constructs an audio file format object.
|
|
AudioFileFormat(AudioFileFormat
Construct an audio file format object with a set of defined properties.
|
|
AudioFileFormat(AudioFileFormat
Constructs an audio file format object.
|
|
AudioInputStream(InputStream
Constructs an audio input stream that has the requested format and length in sample frames, using audio data from the specified input stream.
|
|
Info(Class
Constructs a data line's info object from the specified information, which includes a single audio format.
|
|
Info(Class
Constructs a data line's info object from the specified information, which includes a set of supported audio formats and a range for the buffer size.
|
|
Info(Class
Constructs a data line's info object from the specified information, which includes a single audio format and a desired buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
abstract AudioFormat |
FormatConversionProvider.getTargetFormats(AudioFormat
Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned.
|
| Modifier and Type | Method and Description |
|---|---|
abstract AudioInputStream |
FormatConversionProvider.getAudioInputStream(AudioFormat
Obtains an audio input stream with the specified format from the given audio input stream.
|
abstract AudioFormat |
FormatConversionProvider.getTargetEncodings(AudioFormat
Obtains the set of target format encodings supported by the format converter given a particular source format.
|
abstract AudioFormat |
FormatConversionProvider.getTargetFormats(AudioFormat
Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned.
|
boolean |
FormatConversionProvider.isConversionSupported(AudioFormat
Indicates whether the format converter supports conversion to a particular encoding from a particular format.
|
boolean |
FormatConversionProvider.isConversionSupported(AudioFormat
Indicates whether the format converter supports conversion to one particular format from another.
|