com.frinika.toot.javasoundmultiplexed
Class MultiplexedJavaSoundAudioServer
java.lang.Object
uk.org.toot.audio.server.AbstractAudioServer
uk.org.toot.audio.server.TimedAudioServer
com.frinika.toot.PriorityAudioServer
com.frinika.toot.javasoundmultiplexed.MultiplexedJavaSoundAudioServer
- All Implemented Interfaces:
- java.lang.Runnable, uk.org.toot.audio.server.AudioServer, ExtendedAudioServer
public class MultiplexedJavaSoundAudioServer
- extends PriorityAudioServer
MultiplexedJavaSoundAudioServer
Provides a Server based on a single javasound DataLine for inout and output.
The widest (most channels) line is used.
The server provides IOAudioProcess that can be mono or stereo based on 1 or 2
channels of the target data line.
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, startImpl, stopImpl, 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 |
MultiplexedJavaSoundAudioServer
public MultiplexedJavaSoundAudioServer()
getSampleRate
public float getSampleRate()
getSampleSizeInBits
public int getSampleSizeInBits()
getOutputs
public java.util.List<AudioLine> getOutputs()
getInputs
public java.util.List<AudioLine> getInputs()
resizeBuffers
protected void resizeBuffers()
getInDeviceList
public java.util.List<java.lang.String> getInDeviceList()
getOutDeviceList
public java.util.List<java.lang.String> getOutDeviceList()
setOutDevice
public void setOutDevice(java.lang.String name)
setInDevice
public void setInDevice(java.lang.String name)
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()
start
public void start()
- Specified by:
start
in interface uk.org.toot.audio.server.AudioServer
- Overrides:
start
in class AbstractAudioServer
stop
public void stop()
- Specified by:
stop
in interface uk.org.toot.audio.server.AudioServer
- Overrides:
stop
in class AbstractAudioServer
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
flushInputs
protected void flushInputs()
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()
work
public void work()
- Overrides:
work
in class PriorityAudioServer