// ----------------- EventManager.Processor interface -----------------
public void processEvent( BasicEvent be )
{
final Event e = (Event) be;
final OSCMessage msg = e.msg;
// final int busIndex = ((Number) msg.getArg( 0 )).intValue();
// final int numVals = ((Number) msg.getArg( 1 )).intValue();
// getWhen doesn't provide a valid value i think
// final long time = e.getWhen();
final long time = System.currentTimeMillis();
Client mc;
// if( (bus == null) || (busIndex != bus.getIndex()) ) return;
for( int i = 0, off = 0; i < collActiveClients.size(); i++ ) {
mc = (Client) collActiveClients.get( i );
if( (((Number) msg.getArg( off++ )).intValue() != mc.ctrlBus.getIndex()) ||
(((Number) msg.getArg( off++ )).intValue() != mc.ctrlBus.getNumChannels()) ) return;
if( mc.task ) {
if( mc.monoSum ) {
mc.peakRMSPairs[ 0 ] = ((Number) msg.getArg( off++ )).floatValue();
mc.peakRMSPairs[ 1 ] = ((Number) msg.getArg( off++ )).floatValue();
} else {
for( int j = 0, k = 0; k < mc.srcChans.length; k++) {
if( mc.srcChans[ k ] >= 0 ) {
mc.peakRMSPairs[ j++ ] = ((Number) msg.getArg( off++ )).floatValue();
mc.peakRMSPairs[ j++ ] = ((Number) msg.getArg( off++ )).floatValue();
} else {
mc.peakRMSPairs[ j++ ] = 0f;
mc.peakRMSPairs[ j++ ] = 0f;
off += 2;
}