uk.org.toot.audio.server
Class JavaSoundAudioServer
java.lang.Object
uk.org.toot.audio.server.AbstractAudioServer
uk.org.toot.audio.server.TimedAudioServer
com.frinika.toot.PriorityAudioServer
uk.org.toot.audio.server.JavaSoundAudioServer
- All Implemented Interfaces:
- java.lang.Runnable, uk.org.toot.audio.server.AudioServer, ExtendedAudioServer
- Direct Known Subclasses:
- MultiIOJavaSoundAudioServer
public class JavaSoundAudioServer
- extends PriorityAudioServer
JavaSoundAudioServer extends BasicAudioServer with JavaSound-style byte[]
buffer provision and management and JavaSound audio I/O provision.
Fields inherited from interface uk.org.toot.audio.server.AudioServer |
THREAD_NAME |
Methods inherited from class uk.org.toot.audio.server.TimedAudioServer |
calculateBufferFrames, canStart, getActualLatencyMilliseconds, getBufferMilliseconds, getBufferUnderRuns, getLatencyMilliseconds, getLowestLatencyMilliseconds, getMaximumLatencyMilliseconds, getMinimumLatencyMilliseconds, getTotalLatencyFrames, isRunning, reset, resetMetrics, run, setBufferMilliseconds, sync |
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 |
createAudioBuffer, getLoad, setClient, start, stop |
JavaSoundAudioServer
public JavaSoundAudioServer()
checkFormat
protected void checkFormat()
getSampleSizeInBits
public int getSampleSizeInBits()
setSampleSizeInBits
public void setSampleSizeInBits(int sampleSizeInBits)
getSampleRate
public float getSampleRate()
setSampleRate
public void setSampleRate(float sampleRate)
getOutputs
public java.util.List<AudioLine> getOutputs()
getInputs
public java.util.List<AudioLine> getInputs()
resizeBuffers
protected void resizeBuffers(int bufferFrames)
- Overrides:
resizeBuffers
in class AbstractAudioServer
createByteBuffer
protected byte[] createByteBuffer()
getOutputLatencyFrames
public int getOutputLatencyFrames()
getInputLatencyFrames
public int getInputLatencyFrames()
getAvailableOutputNames
public java.util.List<java.lang.String> getAvailableOutputNames()
getAvailableInputNames
public java.util.List<java.lang.String> getAvailableInputNames()
inputForName
protected javax.sound.sampled.Mixer.Info inputForName(java.lang.String name)
outputForName
protected javax.sound.sampled.Mixer.Info outputForName(java.lang.String name)
startImpl
protected void startImpl()
- Overrides:
startImpl
in class TimedAudioServer
stopImpl
protected void stopImpl()
- Overrides:
stopImpl
in class TimedAudioServer
openAudioOutput
public uk.org.toot.audio.server.IOAudioProcess openAudioOutput(java.lang.String name,
java.lang.String label)
throws java.lang.Exception
- Throws:
java.lang.Exception
closeAudioOutput
public void closeAudioOutput(uk.org.toot.audio.server.IOAudioProcess output)
openAudioInput
public uk.org.toot.audio.server.IOAudioProcess openAudioInput(java.lang.String name,
java.lang.String label)
throws java.lang.Exception
- Throws:
java.lang.Exception
closeAudioInput
public void closeAudioInput(uk.org.toot.audio.server.IOAudioProcess input)
setLatencyMilliseconds
public void setLatencyMilliseconds(float ms)
- Description copied from class:
TimedAudioServer
- Set the software output latency request in milliseconds.
This is the demand to the control loop.
- Specified by:
setLatencyMilliseconds
in interface ExtendedAudioServer
- Overrides:
setLatencyMilliseconds
in class TimedAudioServer
minimiseInputLatency
protected void minimiseInputLatency()
controlGained
protected void controlGained()
- Description copied from class:
TimedAudioServer
- Called when the control loop gains control.
- Overrides:
controlGained
in class TimedAudioServer
getConfigKey
public java.lang.String getConfigKey()