com.groovemanager.spi.asio
Interface ASIOListener

All Known Implementing Classes:
ASIOMixer

public interface ASIOListener

ASIO listeners can be added to ASIOMixer instances or generally to an ASIOMixerProvider instance for being notified of some events the ASIO driver may generate.

Author:
Manu Robledo

Method Summary
 boolean bufferSizeChanged(ASIOMixer mixer, int newSize)
          Indicates that the preferred buffer size of the driver has changed.
 boolean latenciesChanged(ASIOMixer mixer)
          Indicates that the input - and/or output-latencies have changed.
 void resetRequest(ASIOMixer mixer)
          Is called when the driver needs a reset.
 boolean resyncRequest(ASIOMixer mixer)
          Indicates that the driver has lost its sync because of some reason and needs resyncing (usually stop and restart)
 void sampleRateChanged(ASIOMixer mixer, double newRate)
          Indicates that the sample rate has changed.
 boolean supportsBufferSizeChange()
          Ask if this ASIOListener will react to the bufferSizeChanged() call.
 boolean supportsLatenciesChanged()
          Ask if this ASIOListener will react to the latenciesChanged() call.
 boolean supportsResyncRequest()
          Ask if this ASIOListener will react to the resyncRequest() call.
 

Method Detail

sampleRateChanged

void sampleRateChanged(ASIOMixer mixer,
                       double newRate)
Indicates that the sample rate has changed. May be because of external sync or because of opening an ASIODataLine with a new AudioFormat

Parameters:
mixer - The ASIOMixer representing the ASIO driver
newRate - The new sample rate

resetRequest

void resetRequest(ASIOMixer mixer)
Is called when the driver needs a reset. It will automatically be closed.

Parameters:
mixer - The ASIOMixer representing the ASIO driver

supportsBufferSizeChange

boolean supportsBufferSizeChange()
Ask if this ASIOListener will react to the bufferSizeChanged() call. If it ignores calls to bufferSizeChanged(), false should be returned.

Returns:
true if this listener may react to calls to bufferSizeChanged(), false otherwise

bufferSizeChanged

boolean bufferSizeChanged(ASIOMixer mixer,
                          int newSize)
Indicates that the preferred buffer size of the driver has changed.

Parameters:
mixer - The ASIOMixer representing the ASIO driver
newSize - The new buffersize in sample frames. Please note that this value means a size in frames, not a number of bytes.
Returns:
true if this listener has accepted the message, false otherwise.

supportsResyncRequest

boolean supportsResyncRequest()
Ask if this ASIOListener will react to the resyncRequest() call. If it ignores calls to resyncRequest(), false should be returned.

Returns:
true if this listener may react to calls to resyncRequest(), false otherwise

resyncRequest

boolean resyncRequest(ASIOMixer mixer)
Indicates that the driver has lost its sync because of some reason and needs resyncing (usually stop and restart)

Parameters:
mixer - The ASIOMixer representing the ASIO driver
Returns:
true if this listener has accepted the message, false otherwise.

supportsLatenciesChanged

boolean supportsLatenciesChanged()
Ask if this ASIOListener will react to the latenciesChanged() call. If it ignores calls to latenciesChanged(), false should be returned.

Returns:
true if this listener may react to calls to latenciesChanged(), false otherwise

latenciesChanged

boolean latenciesChanged(ASIOMixer mixer)
Indicates that the input - and/or output-latencies have changed. The latency values can be queried by ASIOMixer.getInputLatency() and ASIOMixer.getOutputLatency()

Parameters:
mixer - The ASIOMixer representing the ASIO driver
Returns:
true if this listener has accepted the message, false otherwise.