com.sun.media.sound.AudioSynthesizer |
![]() |
AudioSynthesizer
is a Synthesizer
which renders it's output audio into SourceDataLine
or AudioInputStream
.
Synthesizer
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Obtains the current format (encoding, sample rate, number of channels,
etc.) of the synthesizer audio data.
| |||||||||||
Gets information about the possible properties for the synthesizer.
| |||||||||||
Opens the synthesizer and starts rendering audio into
SourceDataLine . | |||||||||||
Opens the synthesizer and renders audio into returned
AudioInputStream . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Obtains the current format (encoding, sample rate, number of channels, etc.) of the synthesizer audio data.
If the synthesizer is not open and has never been opened, it returns the default format.
Gets information about the possible properties for the synthesizer.
info | a proposed list of tag/value pairs that will be sent on open. |
---|
AudioSynthesizerPropertyInfo
objects
describing possible properties. This array may be an empty array if
no properties are required.
Opens the synthesizer and starts rendering audio into
SourceDataLine
.
An application opening a synthesizer explicitly with this call
has to close the synthesizer by calling close()
. This is
necessary to release system resources and allow applications to
exit cleanly.
Note that some synthesizers, once closed, cannot be reopened.
Attempts to reopen such a synthesizer will always result in
a MidiUnavailableException
.
line | which AudioSynthesizer writes output audio into.
If line is null, then line from system default mixer is used. |
---|---|
info | a Map object containing
properties for additional configuration supported by synthesizer.
If info is null then default settings are used. |
MidiUnavailableException | thrown if the synthesizer cannot be opened due to resource restrictions. |
---|---|
SecurityException | thrown if the synthesizer cannot be opened due to security restrictions. |
Opens the synthesizer and renders audio into returned
AudioInputStream
.
An application opening a synthesizer explicitly with this call
has to close the synthesizer by calling close()
. This is
necessary to release system resources and allow applications to
exit cleanly.
Note that some synthesizers, once closed, cannot be reopened.
Attempts to reopen such a synthesizer will always result in
a MidiUnavailableException
.
Parameters
targetFormat
specifies the AudioFormat
used in returned AudioInputStream
.
info
a Map
object containing
properties for additional configuration supported by synthesizer.
If info
is null then default settings are used.
Throws
MidiUnavailableException
thrown if the synthesizer cannot be
opened due to resource restrictions.
SecurityException
thrown if the synthesizer cannot be
opened due to security restrictions.