public abstract class AudioIO
extends java.lang.Object
AudioContext
and the world. It is
designed to be largely controlled by AudioContext
. To be precise, AudioContext will prepare(), start(), and stop() the
AudioIO it is initialised with. However, certain AudioIO implementations may need to be set up before being passed to AudioContext(). By default, AudioContext creates a JavaSoundAudioIO
.Modifier and Type | Field and Description |
---|---|
protected AudioContext |
context
The context.
|
Constructor and Description |
---|
AudioIO() |
Modifier and Type | Method and Description |
---|---|
protected abstract UGen |
getAudioInput(int[] channels)
Gets an audio input
UGen . |
AudioContext |
getContext()
Gets the
AudioContext . |
protected boolean |
prepare()
Prepares the AudioIO.
|
protected abstract boolean |
start()
Starts the AudioIO.
|
protected boolean |
stop()
Stops the AudioIO.
|
protected void |
update()
Updates the
AudioContext . |
protected AudioContext context
protected boolean prepare()
AudioContext
's constructor.
This has default implementation as it will not be needed by most implementation.protected abstract boolean start()
update()
and then gather the output of AudioContext.out
.protected boolean stop()
AudioContext.isRunning()
at
each time step.protected abstract UGen getAudioInput(int[] channels)
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.channels
- an array indicating which channels to serve.protected void update()
AudioContext
.public AudioContext getContext()
AudioContext
.