Changeset 459 for trunk/libjdkmidi/trunk

Show
Ignore:
Timestamp:
12/14/07 13:11:32 (11 months ago)
Author:
jeffk@…
Message:

sequencer now allows notifier to be 0

Location:
trunk/libjdkmidi/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/libjdkmidi/trunk/examples/jdkmidi_test_sequencer.cpp

    r107 r459  
    182182    MIDIFileReadMultiTrack track_loader( &tracks ); 
    183183    MIDIFileRead reader( &rs, &track_loader ); 
     184//    MIDISequencerGUIEventNotifierText notifier( stdout ); 
     185//    MIDISequencer seq( &tracks, &notifier );      
    184186    MIDISequencer seq( &tracks );       
    185187     
  • trunk/libjdkmidi/trunk/src/jdkmidi_sequencer.cpp

    r89 r459  
    10831083         
    10841084        // now notify the GUI that the beat number changed 
    1085         state.notifier->Notify( 
    1086           this, 
    1087           MIDISequencerGUIEvent( 
    1088             MIDISequencerGUIEvent::GROUP_TRANSPORT, 
    1089             0, 
    1090             MIDISequencerGUIEvent::GROUP_TRANSPORT_BEAT 
    1091             ) 
    1092           ); 
    1093          
     1085        if( state.notifier ) 
     1086        { 
     1087          state.notifier->Notify( 
     1088            this, 
     1089            MIDISequencerGUIEvent( 
     1090              MIDISequencerGUIEvent::GROUP_TRANSPORT, 
     1091              0, 
     1092              MIDISequencerGUIEvent::GROUP_TRANSPORT_BEAT 
     1093              ) 
     1094            ); 
     1095        } 
     1096 
    10941097        // if the new beat number is 0 then the measure changed too 
    1095         if( state.cur_beat==0 ) 
     1098        if( state.cur_beat==0 && state.notifier ) 
    10961099        { 
    10971100          state.notifier->Notify(