private void handleUpdate ( final int player ) { final TrackMetadata metadata = MetadataFinder . getInstance ( ) . getLatestMetadataFor ( player ) ; final WaveformDetail waveformDetail = WaveformFinder . getInstance ( ) . getLatestDetailFor ( player ) ; final BeatGrid beatGrid = BeatGridFinder . getInstance ( ) . getLatestBeatGridFor ( player ) ; if ( metadata != null && waveformDetail != null && beatGrid != null ) { final String signature = computeTrackSignature ( metadata . getTitle ( ) , metadata . getArtist ( ) , metadata . getDuration ( ) , waveformDetail , beatGrid ) ; if ( signature != null ) { signatures . put ( player , signature ) ; deliverSignatureUpdate ( player , signature ) ; } } }
We have reason to believe we might have enough information to calculate a signature for the track loaded on a player . Verify that and if so perform the computation and record and report the new signature .