C# Class javazoom.jl.player.AudioDeviceBase

The AudioDeviceBase class provides a simple thread-safe implementation of the AudioDevice interface. Template methods are provided for subclasses to override and in doing so provide the implementation for the main operations of the AudioDevice interface. @since 0.0.8
Inheritance: AudioDevice
Datei anzeigen Open project: RHY3756547/FreeSO

Public Methods

Method Description
close ( ) : void

Closes this audio device. If the device is currently playing audio, playback is stopped immediately without flushing any buffered audio data.

flush ( ) : void

Waits for any buffered audio samples to be played by the audio device. This method should only be called prior to closing the device.

open ( Decoder decoder ) : void

Opens this audio device.

write ( short samples, int offs, int len ) : void

Writes audio data to this audio device. Audio data is assumed to be in the output format of the decoder. This method may return before the data has actually been sounded by the device if the device buffers audio samples.

Protected Methods

Method Description
closeImpl ( ) : void

Template method to provide the implementation for closing the audio device.

flushImpl ( ) : void

Template method to provide the implementation for flushing any buffered audio data.

openImpl ( ) : void

Template method to provide the implementation for the opening of the audio device.

writeImpl ( short samples, int offs, int len ) : void

Template method to provide the implementation for writing audio samples to the audio device.

Method Details

close() public method

Closes this audio device. If the device is currently playing audio, playback is stopped immediately without flushing any buffered audio data.
public close ( ) : void
return void

closeImpl() protected method

Template method to provide the implementation for closing the audio device.
protected closeImpl ( ) : void
return void

flush() public method

Waits for any buffered audio samples to be played by the audio device. This method should only be called prior to closing the device.
public flush ( ) : void
return void

flushImpl() protected method

Template method to provide the implementation for flushing any buffered audio data.
protected flushImpl ( ) : void
return void

open() public method

Opens this audio device.
public open ( Decoder decoder ) : void
decoder javazoom.jl.decoder.Decoder
return void

openImpl() protected method

Template method to provide the implementation for the opening of the audio device.
protected openImpl ( ) : void
return void

write() public method

Writes audio data to this audio device. Audio data is assumed to be in the output format of the decoder. This method may return before the data has actually been sounded by the device if the device buffers audio samples.
public write ( short samples, int offs, int len ) : void
samples short
offs int
len int
return void

writeImpl() protected method

Template method to provide the implementation for writing audio samples to the audio device.
protected writeImpl ( short samples, int offs, int len ) : void
samples short
offs int
len int
return void