I would use the IStreamListener to know when the second sound has finished playing.
First, have your class implement IStreamListener, and add a string to hold the second source name:
Class MyClass implements IStreamListener
{
String sourceB = null;
Set up your first streaming source and begin looping it:
mySoundSystem.newStreamingSource( true, "Source A", urlA, identifierA, true, 0, 0, 0, SoundSystemConfig.ATTENUATION_NONE, 0 );
mySoundSystem.play( "Source A" );
Some event happens... quick-stream the second streaming source, and pause the first one:
sourceB = mySoundSystem.quickStream( true, urlB, identifierB, false, 0, 0, 0, SoundSystemConfig.ATTENUATION_NONE, 0 );
mySoundSystem.pause( "Source A" );
And finally, implement the IStreamListener interface to restart the first streaming source when the second one finishes:
public void endOfStream( String sourcename, int queueSize )
{
if( sourceB != null && sourceB.equals( sourcename ) )
{
mySoundSystem.play( "Source A" );
sourceB = null;
}
}
Of course, you'll probably want to use something a little more thread-safe when handling that temporary source name, but you get the basic idea.