Save This Page
Home » openjdk-7 » com.sun.media » sound » [javadoc | source]
com.sun.media.sound
public interface: AudioSynthesizer [javadoc | source]

All Implemented Interfaces:
    Synthesizer

All Known Implementing Classes:
    SoftSynthesizer

AudioSynthesizer is a Synthesizer which renders it's output audio into SourceDataLine or AudioInputStream.
Method from com.sun.media.sound.AudioSynthesizer Summary:
getFormat,   getPropertyInfo,   open,   openStream
Method from com.sun.media.sound.AudioSynthesizer Detail:
 public AudioFormat getFormat()
    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.

 public AudioSynthesizerPropertyInfo[] getPropertyInfo(Map<String, Object> info)
    Gets information about the possible properties for the synthesizer.
 public  void open(SourceDataLine line,
    Map<String, Object> info) throws MidiUnavailableException
    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.

 public AudioInputStream openStream(AudioFormat targetFormat,
    Map<String, Object> info) throws MidiUnavailableException
    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.