Module java.desktop
Package javax.sound.sampled
Provides interfaces and classes for capture, processing, and playback of
sampled audio data.
Related Documentation
For more information on using Java Sound see: Please note: In thejavax.sound.sampled
APIs, a null
reference parameter to methods is incorrect unless explicitly documented on
the method as having a meaningful interpretation. Usage to the contrary is
incorrect coding and may result in a run time exception either immediately or
at some later time. NullPointerException
is an example of typical and
acceptable run time exception for such cases.- Since:
- 1.3
-
Interface Summary Interface Description Clip TheClip
interface represents a special kind of data line whose audio data can be loaded prior to playback, instead of being streamed in real time.DataLine DataLine
adds media-related functionality to its superinterface,Line
.Line TheLine
interface represents a mono or multi-channel audio feed.LineListener Instances of classes that implement theLineListener
interface can register to receive events when a line's status changes.Mixer A mixer is an audio device with one or more lines.Port Ports are simple lines for input or output of audio to or from audio devices.SourceDataLine A source data line is a data line to which data may be written.TargetDataLine A target data line is a type ofDataLine
from which audio data can be read. -
Class Summary Class Description AudioFileFormat An instance of theAudioFileFormat
class describes an audio file, including the file type, the file's length in bytes, the length in sample frames of the audio data contained in the file, and the format of the audio data.AudioFileFormat.Type An instance of theType
class represents one of the standard types of audio file.AudioFormat AudioFormat
is the class that specifies a particular arrangement of data in a sound stream.AudioFormat.Encoding TheEncoding
class names the specific type of data representation used for an audio stream.AudioInputStream An audio input stream is an input stream with a specified audio format and length.AudioPermission TheAudioPermission
class represents access rights to the audio system resources.AudioSystem TheAudioSystem
class acts as the entry point to the sampled-audio system resources.BooleanControl ABooleanControl
provides the ability to switch between two possible settings that affect a line's audio.BooleanControl.Type An instance of theBooleanControl.Type
class identifies one kind of boolean control.CompoundControl ACompoundControl
, such as a graphic equalizer, provides control over two or more related properties, each of which is itself represented as aControl
.CompoundControl.Type An instance of theCompoundControl.Type
inner class identifies one kind of compound control.Control Lines
often have a set of controls, such as gain and pan, that affect the audio signal passing through the line.Control.Type An instance of theType
class represents the type of the control.DataLine.Info Besides the class information inherited from its superclass,DataLine.Info
provides additional information specific to data lines.EnumControl AnEnumControl
provides control over a set of discrete possible values, each represented by an object.EnumControl.Type An instance of theEnumControl.Type
inner class identifies one kind of enumerated control.FloatControl AFloatControl
object provides control over a range of floating-point values.FloatControl.Type An instance of theFloatControl.Type
inner class identifies one kind of float control.Line.Info ALine.Info
object contains information about a line.LineEvent TheLineEvent
class encapsulates information that a line sends its listeners whenever the line opens, closes, starts, or stops.LineEvent.Type The LineEvent.Type inner class identifies what kind of event occurred on a line.Mixer.Info TheMixer.Info
class represents information about an audio mixer, including the product's name, version, and vendor, along with a textual description.Port.Info ThePort.Info
class extendsLine.Info
with additional information specific to ports, including the port's name and whether it is a source or a target for its mixer.ReverbType TheReverbType
class provides methods for accessing various reverberation settings to be applied to an audio signal. -
Exception Summary Exception Description LineUnavailableException ALineUnavailableException
is an exception indicating that a line cannot be opened because it is unavailable.UnsupportedAudioFileException AnUnsupportedAudioFileException
is an exception indicating that an operation failed because a file did not contain valid data of a recognized file type and format.