|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AudioServer
An AudioServer represents the single thread of time and is responsible for separating other code from the concerns of timing and hardware i/o. The timing concern is seperated with setClient(), the server should call work() on the currently set client when it isRunning(), synchronously with hardware i/o. The server can be started with start() and stopped with stop(). Also, createAudioBuffer() returns an AudioBuffer suitable for use with the particular timing, it is assumed that work() is called at regular intervals for which the buffer size is appropriate. The server should synchronously resize buffers if the implicit timing is changed. The hardware i/o is abstracted with getAvailableOutputNames() and getAvailableInputNames() to discover the names of hardware output and input lines repsectively. Also, createAudioOutput() and createAudioInput() create AudioProcess's backed by named hardware lines with user specified labels. An AudioServer implementation should use a particular audio format, defined in its own terms, to return appropriate AudioBuffers and AudioProcesses. Latency occurs in hardware and software for both input and output. Total latency from analogue input to analogue output is Hardware Input + Software Input + Software Output + Hardware Output
Field Summary | |
---|---|
static java.lang.String |
THREAD_NAME
|
Method Summary | |
---|---|
void |
closeAudioInput(IOAudioProcess input)
|
void |
closeAudioOutput(IOAudioProcess output)
|
AudioBuffer |
createAudioBuffer(java.lang.String name)
|
java.util.List<java.lang.String> |
getAvailableInputNames()
|
java.util.List<java.lang.String> |
getAvailableOutputNames()
|
int |
getInputLatencyFrames()
|
float |
getLoad()
|
int |
getOutputLatencyFrames()
|
float |
getSampleRate()
|
int |
getTotalLatencyFrames()
|
boolean |
isRunning()
Returns whether running. |
IOAudioProcess |
openAudioInput(java.lang.String name,
java.lang.String label)
Returns an AudioProcess backed by a hardware audio input line represented by 'name' and labelled 'label'. |
IOAudioProcess |
openAudioOutput(java.lang.String name,
java.lang.String label)
Returns an AudioProcess backed by a hardware audio output line represented by 'name' and labelled 'label'. |
void |
setClient(AudioClient client)
Sets the single AudioClient. |
void |
start()
Requests that the server starts if possible, otherwise actual start will be deferred until it is possible. |
void |
stop()
Stops the server. |
Field Detail |
---|
static final java.lang.String THREAD_NAME
Method Detail |
---|
void start()
void stop()
boolean isRunning()
void setClient(AudioClient client)
java.util.List<java.lang.String> getAvailableOutputNames()
java.util.List<java.lang.String> getAvailableInputNames()
IOAudioProcess openAudioOutput(java.lang.String name, java.lang.String label) throws java.lang.Exception
java.lang.Exception
IOAudioProcess openAudioInput(java.lang.String name, java.lang.String label) throws java.lang.Exception
java.lang.Exception
void closeAudioOutput(IOAudioProcess output)
void closeAudioInput(IOAudioProcess input)
AudioBuffer createAudioBuffer(java.lang.String name)
float getSampleRate()
float getLoad()
int getInputLatencyFrames()
int getOutputLatencyFrames()
int getTotalLatencyFrames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |