|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.sound.sampled.spi.MixerProvider
com.groovemanager.spi.asio.ASIOMixerProvider
public class ASIOMixerProvider
This class serves as ServiceProvider for accessing ASIODrivers from Java Sound
Nested Class Summary | |
---|---|
static class |
ASIOMixerProvider.ASIOMixerInfo
Info-class for ASIOMixer instances |
Field Summary | |
---|---|
private static ASIOMixer |
activeMixer
The currently loaded ASIO driver if any |
private static ASIODriverInfo |
asioDriverInfo
ASIODriverInfo of the currently loaded Mixer if any |
private static AsioDrivers |
asioDrivers
AsioDrivers object for accessing driver infos |
private static ArrayList<ASIOListener> |
asioListeners
List of all registered ASIOListeners |
private static ASIOBufferInfo[] |
bufferInfos
The last used ASIOBufferInfos |
private static String[] |
drivers
The available ASIO drivers |
private static String |
errorMessage
Last error message if any |
private static boolean |
fullCheck
speed improvement enables/disables fullCheck useful for realtime use, if all parameters are safe! |
private static Mixer.Info[] |
infos
The Info objects for the available ASIO drivers |
private static long |
initSeq
The sequence number that was actually used for the last real ASIOInit() call |
(package private) static String |
LIB_NAME
The name of the jsasio library |
(package private) static String |
LIB_VERSION
The version of the jsasio library version |
private static HashMap<String,ASIOMixer> |
mixerPool
The pool of Mixers. |
private static long |
sequence
Sequence number that will be incremented and returned for each ASIOInit() call |
Constructor Summary | |
---|---|
ASIOMixerProvider()
Constructs a new ASIOMixerProvider |
Method Summary | |
---|---|
void |
addASIOListener(ASIOListener listener)
Register an ASIOListener that will be notified of callbacks from any ASIOMixer |
(package private) static void |
ASIOExit(ASIOMixer mixer,
long seq)
Exit this driver |
(package private) static long |
ASIOInit(ASIOMixer mixer)
Initialize and load an ASIO driver if needed |
private static boolean |
ASIOLoad(ASIOMixer mixer)
Try to load an ASIO driver if needed |
private static int |
asioMessage(int selector,
int value)
|
(package private) static long |
ASIOPrepare(ASIOMixer mixer,
ASIOBufferInfo[] infos,
int buffersize)
Prepare, initialize and load an ASIO driver if needed |
(package private) static long |
ASIOStart(ASIOMixer mixer,
ASIOBufferInfo[] infos,
int buffersize)
Start, prepare, init and load an ASIO driver if needed |
(package private) static boolean |
ASIOStop(ASIOMixer mixer)
Stop an ASIO driver if needed |
private static void |
ASIOUnLoad(ASIOMixer mixer)
Unload an ASIO driver |
(package private) static boolean |
ASIOUnPrepare(ASIOMixer mixer)
Dispose buffers and Stop the driver if needed |
private static boolean |
bufferSizeChanged(int newSize)
|
private static boolean |
bufferSizeChangedSupported()
|
static void |
freeAll()
This method tries to free all ASIO-related ressources. |
(package private) static ASIOMixer |
getActiveMixer()
Get the currently loaded ASIOMixer if any |
(package private) static ASIOBufferInfo[] |
getBufferInfo()
Get the last used ASIOBufferInfos |
(package private) static ASIODriverInfo |
getDriverInfo()
Get the ASIODriverInfo of the currently loaded driver if any. |
static String |
getErrorMessage()
Get the last error message. |
(package private) static String |
getLibName()
Get the full library name to be loaded |
ASIOMixer |
getMixer(Mixer.Info info)
|
Mixer.Info[] |
getMixerInfo()
|
static boolean |
isFullCheck()
|
boolean |
isMixerSupported(Mixer.Info i)
|
private void |
jSampleRateDidChange(long pointer)
|
private static boolean |
latenciesChanged()
|
private static boolean |
latenciesChangedSupported()
|
private static long |
nextSeq()
Get the next sequence number |
void |
removeASIOListener(ASIOListener listener)
Removes a registered ASIOListener |
private static void |
resetRequest(ASIOMixer mixer)
|
private static boolean |
resyncRequest()
|
private static boolean |
resyncRequestSupported()
|
private void |
sampleRateDidChange(ASIOSampleRate newRate)
|
private static boolean |
selectorSupported(int selector)
Called from the ASIO callback asioMessage() |
static void |
setFullCheck(boolean fullCheck)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static boolean fullCheck
private static HashMap<String,ASIOMixer> mixerPool
private static AsioDrivers asioDrivers
private static ASIOMixer activeMixer
private static ASIODriverInfo asioDriverInfo
private static String errorMessage
private static ASIOBufferInfo[] bufferInfos
private static String[] drivers
private static Mixer.Info[] infos
private static long sequence
private static long initSeq
private static ArrayList<ASIOListener> asioListeners
static final String LIB_VERSION
static final String LIB_NAME
Constructor Detail |
---|
public ASIOMixerProvider()
Method Detail |
---|
public static void setFullCheck(boolean fullCheck)
public static boolean isFullCheck()
static String getLibName()
public static void freeAll()
public boolean isMixerSupported(Mixer.Info i)
isMixerSupported
in class MixerProvider
MixerProvider.isMixerSupported(javax.sound.sampled.Mixer.Info)
static ASIOMixer getActiveMixer()
static ASIOBufferInfo[] getBufferInfo()
private static long nextSeq()
public Mixer.Info[] getMixerInfo()
getMixerInfo
in class MixerProvider
MixerProvider.getMixerInfo()
public ASIOMixer getMixer(Mixer.Info info)
getMixer
in class MixerProvider
MixerProvider.getMixer(javax.sound.sampled.Mixer.Info)
public static String getErrorMessage()
static ASIODriverInfo getDriverInfo()
private static boolean ASIOLoad(ASIOMixer mixer)
mixer
- The ASIOMixer to load
static long ASIOInit(ASIOMixer mixer) throws ASIOError
mixer
- The ASIO driver to initialize
ASIOError
- If ASIOInit() failsstatic long ASIOPrepare(ASIOMixer mixer, ASIOBufferInfo[] infos, int buffersize) throws ASIOError
mixer
- The ASIO driver to prepareinfos
- The ASIOBufferInfo objects that should be filledbuffersize
- The buffer size in sample frames
ASIOError
- If ASIOCreateBuffers() failsstatic long ASIOStart(ASIOMixer mixer, ASIOBufferInfo[] infos, int buffersize) throws ASIOError
mixer
- The ASIO driver to startinfos
- The ASIOBufferInfos to be filledbuffersize
- The buffersize
ASIOError
- If ASIOStart() failsstatic boolean ASIOStop(ASIOMixer mixer) throws ASIOError
mixer
- The ASIO driver that should be stopped
ASIOError
- If ASIOStop() failedstatic boolean ASIOUnPrepare(ASIOMixer mixer) throws ASIOError
mixer
- The ASIO driver to be stopped
ASIOError
- If ASIODisposeBuffers failedstatic void ASIOExit(ASIOMixer mixer, long seq)
mixer
- The ASIO driverseq
- The sequence number from the call to ASIOInit(). If this
sequence number is the one provided from the real ASIOinit()
call, ASIOExit() will really be called, otherwise notprivate static void ASIOUnLoad(ASIOMixer mixer)
mixer
- The ASIO driverprivate static boolean selectorSupported(int selector)
selector
- The selector to be supported
private static boolean bufferSizeChangedSupported()
private static boolean latenciesChangedSupported()
private static boolean resyncRequestSupported()
private static void resetRequest(ASIOMixer mixer)
private static boolean bufferSizeChanged(int newSize)
private static boolean resyncRequest()
private static boolean latenciesChanged()
private static int asioMessage(int selector, int value)
public void addASIOListener(ASIOListener listener)
listener
- The ASIOListener to be addedpublic void removeASIOListener(ASIOListener listener)
listener
- The ASIOListener to be removedprivate void jSampleRateDidChange(long pointer)
private void sampleRateDidChange(ASIOSampleRate newRate)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |