com.frinika.audio.toot
Class FrinikaAudioSystem

java.lang.Object
  extended by com.frinika.audio.toot.FrinikaAudioSystem

public class FrinikaAudioSystem
extends java.lang.Object


Field Summary
static boolean usePhysicalAudioOutput
          Skip seeing audio outputs if neccesary (e.g.
 
Constructor Summary
FrinikaAudioSystem()
           
 
Method Summary
static uk.org.toot.audio.server.IOAudioProcess audioInputDialog(javax.swing.JFrame frame, java.lang.String prompt)
           
static uk.org.toot.audio.server.IOAudioProcess audioOutputDialog(javax.swing.JFrame frame, java.lang.String prompt)
           
static void close()
          Called on exit.
static void configure()
          Allow user to play with server parameters.
static java.lang.String configureServerOutput()
           
static int getAudioBufferSize()
           
static FrinikaAudioServer getAudioServer()
           
static uk.org.toot.audio.server.AudioServer getAudioServerInit()
          This is intended for Step 1 of the SplashScreen audio server setup.
static uk.org.toot.audio.server.IOAudioProcess getDefaultOutput(javax.swing.JFrame frame)
           
static double getOutputLatencyMillis()
           
static double getSampleRate()
           
static int getTotalLatency()
           
static boolean installClient(uk.org.toot.audio.server.AudioClient mixer)
          sets a new mixer.
static void intitIO()
          step 2
static void latencyMeasureSet()
          Allow user to play with server parameters.
static void loadServerConfigPost()
           
static void returnAudioServer(java.lang.Object thief)
          return the audio server for general use.
static void revertMixer()
          revert to previous mixer
static void saveServerConfig()
           
static void setTotalLatency(int frames)
          This method allows you to use a measured round trip latency to estimate the extra latency not estimated directly by the audioServer.
static uk.org.toot.audio.server.AudioServer stealAudioServer(java.lang.Object thief, uk.org.toot.audio.server.AudioClient client)
          This allows you to have sole ownership of the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

usePhysicalAudioOutput

public static boolean usePhysicalAudioOutput
Skip seeing audio outputs if neccesary (e.g. standalone wav rendering)

Constructor Detail

FrinikaAudioSystem

public FrinikaAudioSystem()
Method Detail

getAudioServer

public static FrinikaAudioServer getAudioServer()

getAudioServerInit

public static uk.org.toot.audio.server.AudioServer getAudioServerInit()
This is intended for Step 1 of the SplashScreen audio server setup. This called before the audio server has been created Create AudioServer instance. If one already exists it is a mistake.

Returns:
the audio server instance

intitIO

public static void intitIO()
step 2


configureServerOutput

public static java.lang.String configureServerOutput()

installClient

public static boolean installClient(uk.org.toot.audio.server.AudioClient mixer)
sets a new mixer.

Parameters:
mixer - new client for the server
Returns:
true if success. (fail if it is stolen)

revertMixer

public static void revertMixer()
revert to previous mixer


audioOutputDialog

public static uk.org.toot.audio.server.IOAudioProcess audioOutputDialog(javax.swing.JFrame frame,
                                                                        java.lang.String prompt)
                                                                 throws java.lang.Exception
Throws:
java.lang.Exception

getDefaultOutput

public static uk.org.toot.audio.server.IOAudioProcess getDefaultOutput(javax.swing.JFrame frame)

audioInputDialog

public static uk.org.toot.audio.server.IOAudioProcess audioInputDialog(javax.swing.JFrame frame,
                                                                       java.lang.String prompt)
                                                                throws java.lang.Exception
Throws:
java.lang.Exception

latencyMeasureSet

public static void latencyMeasureSet()
Allow user to play with server parameters. Actually redundant because JavaSound is getFramePos is accurate


setTotalLatency

public static void setTotalLatency(int frames)
This method allows you to use a measured round trip latency to estimate the extra latency not estimated directly by the audioServer. This will estimate the hardware latency so the getTotalLatency will return a correct value even if you change audioServer bufer sizes.

Parameters:
frames - measured total round trip latency.

getTotalLatency

public static int getTotalLatency()
Returns:
total round trip latency estimate

getOutputLatencyMillis

public static double getOutputLatencyMillis()
Returns:
esitmated output latency

configure

public static void configure()
Allow user to play with server parameters.


getSampleRate

public static double getSampleRate()
Returns:
sample rate of the audioServer

stealAudioServer

public static uk.org.toot.audio.server.AudioServer stealAudioServer(java.lang.Object thief,
                                                                    uk.org.toot.audio.server.AudioClient client)
This allows you to have sole ownership of the server. Whilst stolen it is not possible for any one else to use the server. The thief must return it as sone as possible. This is intended to thwart anything that tries to be helpful by automatically switching clients

Parameters:
thief -
Returns:
the audioserver instance or null if the method fails.

returnAudioServer

public static void returnAudioServer(java.lang.Object thief)
return the audio server for general use. check no one cheats by pretending they stole it !!!

Parameters:
thief -

getAudioBufferSize

public static int getAudioBufferSize()

loadServerConfigPost

public static void loadServerConfigPost()

saveServerConfig

public static void saveServerConfig()

close

public static void close()
Called on exit. Put code in here to clse on any devices .