micromod.output
Class PCM16StreamOutputDevice
java.lang.Object
micromod.output.PCM16StreamOutputDevice
- All Implemented Interfaces:
- OutputDevice, PCM16, StreamOutputDevice
- Direct Known Subclasses:
- HasAvailableOutputDevice, OSSOutputDevice
- public abstract class PCM16StreamOutputDevice
- extends java.lang.Object
- implements StreamOutputDevice, PCM16
A PCM16StreamOutputDevice can be fed a 16 bit stereo audio stream,
which is automatically converted to the native PCM format of the device.
Method Summary |
protected void |
initialise(AudioFormatConverter converter)
Configure the device for the specified format. |
void |
write(short[] leftBuffer,
short[] rightBuffer,
int length)
Write length frames of 16 bit stereo audio. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONVERT_BUFFER_FRAMES
protected static int CONVERT_BUFFER_FRAMES
convertBuffer
protected byte[] convertBuffer
bytesPerFrame
protected int bytesPerFrame
converter
protected AudioFormatConverter converter
PCM16StreamOutputDevice
public PCM16StreamOutputDevice()
initialise
protected void initialise(AudioFormatConverter converter)
- Configure the device for the specified format.
This method must be called by any subclasses.
- Parameters:
converter
- An implementation of AudioFormatConverter.
write
public void write(short[] leftBuffer,
short[] rightBuffer,
int length)
- Write length frames of 16 bit stereo audio.
A frame is one 16 bit stereo sample.