uk.org.toot.audio.server
Class TimeReferenceMultiIOJavaSoundAudioServer

java.lang.Object
  extended by uk.org.toot.audio.server.AbstractAudioServer
      extended by uk.org.toot.audio.server.TimedAudioServer
          extended by com.frinika.toot.PriorityAudioServer
              extended by uk.org.toot.audio.server.JavaSoundAudioServer
                  extended by uk.org.toot.audio.server.MultiIOJavaSoundAudioServer
                      extended by uk.org.toot.audio.server.TimeReferenceMultiIOJavaSoundAudioServer
All Implemented Interfaces:
java.lang.Runnable, uk.org.toot.audio.server.AudioServer, ExtendedAudioServer

public class TimeReferenceMultiIOJavaSoundAudioServer
extends MultiIOJavaSoundAudioServer

Alternative to the TimedAudioServer where block time is calculated based on how much time left to buffer expires - relying on the blocking to return precisely on time. This is another approach that might work better on some systems (at least on my Linux system it does) - and the technique is to note down the start time of the audio server and only block if the audio produced is more than time elapsed should indicate. This requires less precision in respect to return of the blocking method. NOTE: Not all of the metrics and controls of the TimedAudioServer are implemented (yet).


Nested Class Summary
 
Nested classes/interfaces inherited from class uk.org.toot.audio.server.JavaSoundAudioServer
JavaSoundAudioServer.JavaSoundAudioInput, JavaSoundAudioServer.JavaSoundAudioLine, JavaSoundAudioServer.JavaSoundAudioOutput
 
Field Summary
 
Fields inherited from class uk.org.toot.audio.server.TimedAudioServer
hasStopped, isRunning, maximumLatencyMilliseconds, stableCount, stableThreshold, started, syncLine
 
Fields inherited from class uk.org.toot.audio.server.AbstractAudioServer
bufferFrames, endTimeNanos, startTimeNanos
 
Fields inherited from interface uk.org.toot.audio.server.AudioServer
THREAD_NAME
 
Constructor Summary
TimeReferenceMultiIOJavaSoundAudioServer()
           
 
Method Summary
 void run()
           
protected  void sync()
          Called synchronously with the server to simplify concurrency issues.
 
Methods inherited from class uk.org.toot.audio.server.MultiIOJavaSoundAudioServer
closeAudioInput, closeAudioOutput, openAudioInput, openAudioOutput
 
Methods inherited from class uk.org.toot.audio.server.JavaSoundAudioServer
checkFormat, controlGained, createByteBuffer, getAvailableInputNames, getAvailableOutputNames, getConfigKey, getInputLatencyFrames, getInputs, getOutputLatencyFrames, getOutputs, getSampleRate, getSampleSizeInBits, inputForName, minimiseInputLatency, outputForName, resizeBuffers, setLatencyMilliseconds, setSampleRate, setSampleSizeInBits, startImpl, stopImpl
 
Methods inherited from class com.frinika.toot.PriorityAudioServer
assertPriority, getPriority, requestPriority, work
 
Methods inherited from class uk.org.toot.audio.server.TimedAudioServer
calculateBufferFrames, canStart, getActualLatencyMilliseconds, getBufferMilliseconds, getBufferUnderRuns, getLatencyMilliseconds, getLowestLatencyMilliseconds, getMaximumLatencyMilliseconds, getMinimumLatencyMilliseconds, getTotalLatencyFrames, isRunning, reset, resetMetrics, setBufferMilliseconds
 
Methods inherited from class uk.org.toot.audio.server.AbstractAudioServer
_createAudioBuffer, checkStart, createAudioBuffer, getBufferFrames, getLoad, removeAudioBuffer, setClient, start, stop
 
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
 

Constructor Detail

TimeReferenceMultiIOJavaSoundAudioServer

public TimeReferenceMultiIOJavaSoundAudioServer()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class TimedAudioServer

sync

protected void sync()
Called synchronously with the server to simplify concurrency issues.

Overrides:
sync in class TimedAudioServer