net.beadsproject.beads.core.io
Class JavaSoundAudioIO

java.lang.Object
  extended by net.beadsproject.beads.core.AudioIO
      extended by net.beadsproject.beads.core.io.JavaSoundAudioIO

public class JavaSoundAudioIO
extends AudioIO

The default AudioIO, uses JavaSound.


Field Summary
static int DEFAULT_OUTPUT_BUFFER_SIZE
          The default system buffer size.
 
Fields inherited from class net.beadsproject.beads.core.AudioIO
context
 
Constructor Summary
JavaSoundAudioIO()
          Instantiates a new java sound audio io.
JavaSoundAudioIO(int systemBufferSize)
          Instantiates a new java sound audio io.
 
Method Summary
 void chooseMixerCommandLine()
          Presents a choice of mixers on the commandline.
protected  UGen getAudioInput(int[] channels)
          Gets an audio input UGen.
 int getThreadPriority()
          Gets the thread priority.
static void printMixerInfo()
          Prints information about the current Mixer to System.out.
 void selectMixer(int i)
          Select a mixer by index.
 void setThreadPriority(int priority)
          Sets the priority of the audio thread.
protected  boolean start()
          Starts the audio system running.
 
Methods inherited from class net.beadsproject.beads.core.AudioIO
getContext, prepare, stop, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_OUTPUT_BUFFER_SIZE

public static final int DEFAULT_OUTPUT_BUFFER_SIZE
The default system buffer size.

See Also:
Constant Field Values
Constructor Detail

JavaSoundAudioIO

public JavaSoundAudioIO()
Instantiates a new java sound audio io.


JavaSoundAudioIO

public JavaSoundAudioIO(int systemBufferSize)
Instantiates a new java sound audio io.

Parameters:
systemBufferSize - the system buffer size
Method Detail

chooseMixerCommandLine

public void chooseMixerCommandLine()
Presents a choice of mixers on the commandline.


selectMixer

public void selectMixer(int i)
Select a mixer by index.

Parameters:
i - the index of the selected mixer.

printMixerInfo

public static void printMixerInfo()
Prints information about the current Mixer to System.out.


setThreadPriority

public void setThreadPriority(int priority)
Sets the priority of the audio thread. Default priority is Thread.MAX_PRIORITY.

Parameters:
priority - the new thread priority

getThreadPriority

public int getThreadPriority()
Gets the thread priority.

Returns:
The priority of the audio thread.

start

protected boolean start()
Starts the audio system running.

Specified by:
start in class AudioIO
Returns:
true, if successful

getAudioInput

protected UGen getAudioInput(int[] channels)
Description copied from class: AudioIO
Gets an audio input UGen. The argument specifies an array of channel numbers that this UGen should serve. For example, the array {0, 4, 2} should return a UGen with 3 outputs, corresponding to input channels 1, 5 and 3 respectively on the audio device.

Specified by:
getAudioInput in class AudioIO
Parameters:
channels - an array indicating which channels to serve.
Returns:
the audio input.