The fade effect sounds like a fade-out followed by a fade-in. Would it be possible to make a cross-fade, where the fades overlap 100% ?
Yes, that's why the current default module is called OutInFader and not CrossFader. It's the intent of Advanced ABX (AA), that new types of transitions can be added easily. But it's not the intent, that I am going to be the one implementing all those...
Give it a try yourself, if you like. All that needs to be done is the implementation of basically just one method: process() in the Transitioner interface. Everything else, like buffering, threading, and timing is automatically taken care of by AA.
/**
* Instances of <code>Transitioner</code> are able to create a transition between two sequences
* of samples contained in two byte arrays, described by an <code>AudioFormat</code> object.
*/
public interface Transitioner {
/**
* The function reads two sample sequences from <code>active</code> and
* <code>next</code> and writes the result into <code>result</code>
*
* @param active Currently active stream.
* @param next Stream to switch/transition to.
* @param srcOffset Position of the first byte to read.
* @param result Array to write the transition to.
* @param dstOffset Position of the first byte to write.
* @param frameCount Transition length in samples.
* @param format Stream description.
*/
public void process(byte[] active, byte[] next, int srcOffset, byte[] result, int dstOffset,
int frameCount, AudioFormat format);
public String getName();
public String getParameters();
}
Look at OutInFader.java in the source package for a simple example.
I agree that the delay between mouse-click and audio switch is too long now.
My idea of last night, to just starve the output buffers, is working out quite well. I'm going to upload a version with just 50 ms delay shortly.