com.frinika.project
Class FrinikaAudioSystem

java.lang.Object
  extended by com.frinika.project.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 getSampleRate()
           
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 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.
 
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.

configure

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


getSampleRate

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

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 .