uk.org.toot.audio.server
Class AbstractAudioServer
java.lang.Object
uk.org.toot.audio.server.AbstractAudioServer
- All Implemented Interfaces:
- uk.org.toot.audio.server.AudioServer
- Direct Known Subclasses:
- TimedAudioServer
public abstract class AbstractAudioServer
- extends java.lang.Object
- implements uk.org.toot.audio.server.AudioServer
This class provides generic AudioServer functionality suitable for all AudioServer
implementationst.
It provides:
Buffer management (synchronous resizing)
Client Management (enable/diable/work)
Start/Stop management (for delayed start)
Fields inherited from interface uk.org.toot.audio.server.AudioServer |
THREAD_NAME |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface uk.org.toot.audio.server.AudioServer |
closeAudioInput, closeAudioOutput, getAvailableInputNames, getAvailableOutputNames, getInputLatencyFrames, getOutputLatencyFrames, getSampleRate, getTotalLatencyFrames, isRunning, openAudioInput, openAudioOutput |
bufferFrames
protected int bufferFrames
startTimeNanos
protected long startTimeNanos
endTimeNanos
protected long endTimeNanos
AbstractAudioServer
public AbstractAudioServer()
_createAudioBuffer
protected uk.org.toot.audio.core.AudioBuffer _createAudioBuffer(java.lang.String name)
createAudioBuffer
public uk.org.toot.audio.core.AudioBuffer createAudioBuffer(java.lang.String name)
- Specified by:
createAudioBuffer
in interface uk.org.toot.audio.server.AudioServer
removeAudioBuffer
public void removeAudioBuffer(uk.org.toot.audio.core.AudioBuffer buffer)
resizeBuffers
protected void resizeBuffers(int bufferFrames)
getBufferFrames
protected int getBufferFrames()
getLoad
public float getLoad()
- Specified by:
getLoad
in interface uk.org.toot.audio.server.AudioServer
setClient
public void setClient(uk.org.toot.audio.server.AudioClient client)
- Specified by:
setClient
in interface uk.org.toot.audio.server.AudioServer
work
protected void work()
start
public void start()
- Specified by:
start
in interface uk.org.toot.audio.server.AudioServer
stop
public void stop()
- Specified by:
stop
in interface uk.org.toot.audio.server.AudioServer
checkStart
protected void checkStart()
canStart
protected boolean canStart()
startImpl
protected abstract void startImpl()
stopImpl
protected abstract void stopImpl()