Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`protected int` | `bytesPerFrame`
`protected static int` | `CONVERT_BUFFER_FRAMES`
`protected byte[]` | `convertBuffer`
`protected AudioFormatConverter` | `converter`

Constructor Summary
`PCM16StreamOutputDevice()`

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`

Methods inherited from interface micromod.output.StreamOutputDevice
`pause, write`

Methods inherited from interface micromod.output.OutputDevice
`close, start, stop`

Methods inherited from interface micromod.output.PCM16
`getSamplingRate`

Field Detail

### CONVERT_BUFFER_FRAMES

    protected static int CONVERT_BUFFER_FRAMES

### convertBuffer

    protected byte[] convertBuffer

### bytesPerFrame

    protected int bytesPerFrame

### converter

    protected AudioFormatConverter converter

Constructor Detail

### PCM16StreamOutputDevice

    public PCM16StreamOutputDevice()

Method Detail

### 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD