OSSOutputDevice
Keywords: micromod.output.OSSOutputDevice class

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 OSSOutputDevice

    java.lang.Object
      micromod.output.PCM16StreamOutputDevice
          micromod.output.OSSOutputDevice

All Implemented Interfaces:
  OutputDevice, PCM16, StreamOutputDevice

public class OSSOutputDevice
extends PCM16StreamOutputDevice

The OSSOutputDevice provides audio output for pre-1.3 Java VMs by outputing directly to the Linux native audio subsystem. The device will operate on any system that provides libMMOSS.so.

Field Summary

Fields inherited from class micromod.output.PCM16StreamOutputDevice
`bytesPerFrame, CONVERT_BUFFER_FRAMES, convertBuffer, converter`

Constructor Summary
`OSSOutputDevice(int samplingRate)`

Method Summary
`void` | `close()` Close the output device and release any resources.
`int` | `getSamplingRate()`
`protected void` | `ossInit(int samplingRate)`
`void` | `pause()` Pause playback immediately.
`void` | `start()` Begin playing audio.
`void` | `stop()` Stop playback.
`void` | `write(byte[] data, int length)` Write length bytes of audio to the output device This method should return only when all of the audio has been written to the device, except if the device is stopped or paused, in which case the method should return immediately.

Methods inherited from class micromod.output.PCM16StreamOutputDevice
`initialise, write`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OSSOutputDevice

    public OSSOutputDevice(int samplingRate)
                    throws OutputDeviceException

Method Detail

### start

    public void start()

  Description copied from interface: `OutputDevice`
  Begin playing audio. You should call this if you want any output! You must also call this after pause() or stop() to resume playback..

### write

    public void write(byte[] data,
                      int length)

  Description copied from interface: `StreamOutputDevice`
  Write length bytes of audio to the output device This method should return only when all of the audio has been written to the device, except if the device is stopped or paused, in which case the method should return immediately.

### pause

    public void pause()

  Description copied from interface: `StreamOutputDevice`
  Pause playback immediately. Calling start() will continue where you left off.

### stop

    public void stop()

  Description copied from interface: `OutputDevice`
  Stop playback. All audio written to the device should be played before this method returns.

### close

    public void close()

  Description copied from interface: `OutputDevice`
  Close the output device and release any resources. Once this method is called, the device must be reopened to allow playback. Reopening could involve reinstantiation or calling a device specific open() method.

### getSamplingRate

    public int getSamplingRate()

  Returns:
    The PCM sampling rate

### ossInit

    protected void ossInit(int samplingRate)
                    throws OutputDeviceException

  Throws:
    `OutputDeviceException`

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