Changeset 1342

Show
Ignore:
Timestamp:
01/09/08 22:23:22 (8 months ago)
Author:
calvin
Message:

added a toolbar button for the midi sync stuff, also added a lock in CDocument::playMachineNote

Location:
trunk/src/buzelib
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/buzelib/Document.cpp

    r1329 r1342  
    13551355 
    13561356void CDocument::playMachineNote(metaplugin* m, int note, int prevNote) { 
     1357        player->lock(); 
    13571358        player->playMachineNote(m, note, prevNote, 0); 
     1359        player->unlock(); 
    13581360} 
    13591361 
  • trunk/src/buzelib/MainFrm.cpp

    r1341 r1342  
    386386        UISetCheck(ID_RECORD, player->recordParameters?1:0); 
    387387        UISetCheck(ID_DEVICE_RESET, player->workDevice?0:1); 
     388        UISetCheck(ID_PLAY_SYNC, player->midiSyncTransport?1:0); 
    388389 
    389390        UIEnable(ID_EDIT_TOGGLE_AUTOSAVE, FALSE); 
     
    13591360} 
    13601361 
     1362LRESULT CMainFrame::OnPlaySync(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 
     1363        player->midiSyncTransport = !player->midiSyncTransport; 
     1364        return 1; 
     1365} 
    13611366 
    13621367LRESULT CMainFrame::OnRecord(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 
  • trunk/src/buzelib/MainFrm.h

    r1340 r1342  
    231231                UPDATE_ELEMENT(ID_PLAY, UPDUI_TOOLBAR) 
    232232                UPDATE_ELEMENT(ID_PLAY_REPEAT, UPDUI_TOOLBAR) 
     233                UPDATE_ELEMENT(ID_PLAY_SYNC, UPDUI_TOOLBAR) 
    233234                UPDATE_ELEMENT(ID_EDIT_TOGGLE_AUTOSAVE, UPDUI_TOOLBAR) 
    234235                UPDATE_ELEMENT(ID_EDIT_RENDER_SEQUENCE, UPDUI_TOOLBAR) 
     
    313314                COMMAND_ID_HANDLER(ID_RECORD, OnRecord) 
    314315                COMMAND_ID_HANDLER(ID_PLAY_REPEAT, OnPlayRepeat) 
     316                COMMAND_ID_HANDLER(ID_PLAY_SYNC, OnPlaySync) 
    315317                COMMAND_ID_HANDLER(ID_MACHINE_PATTERNS, OnMachinePatterns) 
    316318                COMMAND_ID_HANDLER(ID_MACHINE_SEQUENCER, OnMachineSequencer) 
     
    434436        LRESULT OnRecord(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 
    435437        LRESULT OnPlayRepeat(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 
     438        LRESULT OnPlaySync(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 
    436439        LRESULT OnFileExit(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 
    437440        LRESULT OnFileNew(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 
  • trunk/src/buzelib/buze.rc

    r1340 r1342  
    126126    SEPARATOR 
    127127    BUTTON      ID_DEVICE_RESET 
     128    BUTTON      ID_PLAY_SYNC 
    128129END 
    129130 
     
    11051106    ID_PATTERN_STOP         "Stop (F8)" 
    11061107    ID_PATTERN_PLAY         "Play (Shift-F5)" 
    1107     ID_PLAY_FROM_START      "Play From start\nPlay From Start" 
     1108    ID_PLAY_FROM_START      "Play from start\nPlay From Start" 
    11081109    ID_PLAY_REPEAT          "Toggle repeating on/off\nRepeat" 
     1110    ID_PLAY_SYNC            "Sync To External MIDI Device\nSync To External MIDI Device" 
    11091111    ID_FILEBROWSER_ADD_PATH "Add Path" 
    11101112    ID_FILEBROWSER_REMOVE_PATH "Remove Path" 
     
    11271129STRINGTABLE  
    11281130BEGIN 
    1129     ID_BUTTON32816          "Import wave from file browser" 
    1130     ID_BUTTON32817          "Save current wave to disk" 
    1131     ID_BUTTON32818          "Clear current wave" 
     1131    IDC_LOADWAVEBUTTON      "Import wave from file browser" 
     1132    IDC_SAVEWAVEBUTTON      "Save current wave to disk" 
     1133    IDC_CLEARWAVEBUTTON     "Clear current wave" 
    11321134    ID_RECORD               "Record Parameter Movements\nRecord (F7)" 
    11331135END 
  • trunk/src/buzelib/resource.h

    r1340 r1342  
    182182#define ID_MACHINE_ADDTRACK             32810 
    183183#define ID_PLAYFROMCURSOR               32811 
    184 #define ID_VIEW_ANALYZER                32813 
    185 #define ID_WAVE_FADEOUT                 32814 
    186 #define ID_WAVE_AMP                     32815 
    187 #define ID_BUTTON32816                  32816 
    188 #define ID_BUTTON32817                  32817 
    189 #define ID_BUTTON32818                  32818 
    190 #define ID_RECORD                       32820 
    191 #define ID_CLOSEPANE                    32822 
    192 #define ID_EDIT_DELETE                  32826 
    193 #define ID_EDIT_SELECTALL               32827 
    194 #define ID_EDIT_CLEARSELECTION          32828 
    195 #define ID_VIEW_HARDDISKRECORDER        32829 
    196 #define ID_VIEW_CPUMETER                32830 
    197 #define ID_VIEW_FILES                   32831 
    198 #define ID_DEVICE_RESET                 32833 
    199 #define ID_VIEW_PROPERTIES              32835 
    200 #define ID_PATTERN_CLONE                32837 
    201 #define ID_PATTERN_DELETE               32838 
    202 #define ID_PATTERN_STOP                 32839 
    203 #define ID_PATTERN_PLAY                 32840 
    204 #define ID_PLAY_FROM_START              32841 
    205 #define ID_PLAY_REPEAT                  32842 
     184#define ID_VIEW_ANALYZER                32812 
     185#define ID_WAVE_FADEOUT                 32813 
     186#define ID_WAVE_AMP                     32814 
     187#define ID_RECORD                       32815 
     188#define ID_CLOSEPANE                    32816 
     189#define ID_EDIT_DELETE                  32817 
     190#define ID_EDIT_SELECTALL               32818 
     191#define ID_EDIT_CLEARSELECTION          32819 
     192#define ID_VIEW_HARDDISKRECORDER        32820 
     193#define ID_VIEW_CPUMETER                32821 
     194#define ID_VIEW_FILES                   32822 
     195#define ID_DEVICE_RESET                 32823 
     196#define ID_VIEW_PROPERTIES              32824 
     197#define ID_PATTERN_CLONE                32825 
     198#define ID_PATTERN_DELETE               32826 
     199#define ID_PATTERN_STOP                 32827 
     200#define ID_PATTERN_PLAY                 32828 
     201#define ID_PLAY_FROM_START              32829 
     202#define ID_PLAY_REPEAT                  32830 
     203#define ID_PLAY_SYNC                    32831 
    206204#define ID_FILEBROWSER_ADD_PATH         32843 
    207205#define ID_FILEBROWSER_REMOVE_PATH      32844