public synchronized void setSynced ( boolean sync ) { if ( synced . get ( ) != sync ) { // We are changing sync state, so add or remove our master listener as appropriate. if ( sync && isSendingStatus ( ) ) { addMasterListener ( ourSyncMasterListener ) ; } else { removeMasterListener ( ourSyncMasterListener ) ; } // Also, if there is a tempo master, and we just got synced, adopt its tempo. if ( ! isTempoMaster ( ) && getTempoMaster ( ) != null ) { setTempo ( getMasterTempo ( ) ) ; } } synced . set ( sync ) ; }
Controls whether we are currently staying in sync with the tempo master . Will only be meaningful if we are sending status packets .