Sfoglia il codice sorgente

kcApp.h/cpp : Added routing of bar numbers from score and timeline to/from UI to set the current time location.

master
kevin 8 anni fa
parent
commit
4994d375a1
2 ha cambiato i file con 47 aggiunte e 4 eliminazioni
  1. 40
    1
      src/kc/kcApp.cpp
  2. 7
    3
      src/kc/kcApp.h

+ 40
- 1
src/kc/kcApp.cpp Vedi File

@@ -1164,7 +1164,11 @@ void kcApp::_setTmlnValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp
1164 1164
         case kTmlnSelArgIdx:
1165 1165
           //tp->value( cmDsvStrcz(vp));
1166 1166
           break;
1167
-          
1167
+
1168
+        case kTmlnMeasArgIdx:
1169
+          cp->u.tmln.tlctl->setTimeLineSelectBar( cmDsvUInt(vp));
1170
+          break;
1171
+
1168 1172
         case kTmlnCursArgIdx:
1169 1173
           cp->u.tmln.tlctl->setAudioFileCursor(cmDsvUInt(vp));
1170 1174
           break;
@@ -1272,6 +1276,10 @@ void kcApp::_setScorValue( ctl_t* cp, unsigned instVarId, const cmDspValue_t* vp
1272 1276
           _tlCtl->setScoreVarValue(cp->u.scor.locIdx,cp->u.scor.varId, cmDsvDouble(vp));
1273 1277
           break;
1274 1278
 
1279
+        case kScorMeasArgIdx:
1280
+          _tlCtl->setScoreSelectBar( cmDsvUInt(vp));
1281
+          break;
1282
+          
1275 1283
         default:
1276 1284
           { assert(0); }
1277 1285
       }
@@ -1462,6 +1470,17 @@ void kcApp::_insertAudioSysCfgLabel(unsigned long idx, const char* label)
1462 1470
   _as_btn->add(label,0,NULL,(void*)idx,0);
1463 1471
 }
1464 1472
 
1473
+void kcApp::_setDfltAudioSysCfg(unsigned long idx, const char* label )
1474
+{
1475
+  int i;
1476
+
1477
+  if((i = _as_btn->find_index(label)) != -1 )
1478
+  {
1479
+    _setMenuButton(_as_btn,i,"Audio System Cfg");
1480
+    cmAdIfSetAudioSysCfg(_aiH,_as_btn->mvalue()->argument());
1481
+  }  
1482
+}
1483
+
1465 1484
 void kcApp::_insertDeviceLabel( unsigned long devIdx, bool inputFl, const cmChar_t* label )
1466 1485
 {
1467 1486
   Fl_Menu_Button* bp = inputFl ? _ai_btn : _ao_btn;
@@ -1481,6 +1500,18 @@ void kcApp::_insertProgramLabel( unsigned long idx, const cmChar_t* label )
1481 1500
   _pgm_btn->add(label,0,NULL,(void*)idx,0);
1482 1501
 }
1483 1502
 
1503
+void kcApp::_setDfltProgram(unsigned long idx, const char* label )
1504
+{
1505
+  int i;
1506
+
1507
+  if((i = _pgm_btn->find_index(label)) != -1 )
1508
+  {
1509
+    _setMenuButton(_pgm_btn,i,"Programs");
1510
+    cmAdIfLoadProgram(_aiH,_getCurAudioSubSysIdx(),_pgm_btn->mvalue()->argument());
1511
+  }  
1512
+}
1513
+
1514
+
1484 1515
 void kcApp::_insertSubSysCnt( unsigned long subSysCnt )
1485 1516
 {
1486 1517
   long unsigned i;
@@ -1952,6 +1983,10 @@ void kcApp::_handleUiMsg( const cmDspUiHdr_t* m )
1952 1983
       _insertAudioSysCfgLabel(m->instId,cmDsvStrcz(&m->value));
1953 1984
       break;
1954 1985
 
1986
+    case kAudioSysCfgDfltDuiId:
1987
+      _setDfltAudioSysCfg(m->instId,cmDsvStrcz(&m->value));
1988
+      break;
1989
+      
1955 1990
     case kDeviceDuiId:
1956 1991
       _insertDeviceLabel(m->instId,m->flags,cmDsvStrcz(&m->value));
1957 1992
       break;
@@ -1960,6 +1995,10 @@ void kcApp::_handleUiMsg( const cmDspUiHdr_t* m )
1960 1995
       _insertProgramLabel(m->instId,cmDsvStrcz(&m->value));
1961 1996
       break;
1962 1997
 
1998
+    case kProgramDfltDuiId:
1999
+      _setDfltProgram(m->instId,cmDsvStrcz(&m->value));
2000
+      break;
2001
+      
1963 2002
       // the below codes are used to notify the application 
1964 2003
       // of changes in state of the audio DSP system
1965 2004
 

+ 7
- 3
src/kc/kcApp.h Vedi File

@@ -123,8 +123,9 @@ private:
123 123
     kTmlnFileArgIdx= 0,
124 124
     kTmlnPathArgIdx= 1,
125 125
     kTmlnSelArgIdx = 2,
126
-    kTmlnCursArgIdx= 3,
127
-    kTmlnVarCnt    = 4,
126
+    kTmlnMeasArgIdx= 3,
127
+    kTmlnCursArgIdx= 4,
128
+    kTmlnVarCnt    = 5,
128 129
 
129 130
     kScorFileArgIdx    = 0,
130 131
     kScorSelArgIdx     = 1,
@@ -136,7 +137,8 @@ private:
136 137
     kScorDynArgIdx     = 7,
137 138
     kScorValTypeArgIdx = 8,
138 139
     kScorValueArgIdx   = 9,
139
-    kScorVarCnt        = 10,
140
+    kScorMeasArgIdx    = 10,
141
+    kScorVarCnt        = 11,
140 142
    
141 143
     kTksbFileArgIdx    = 0,
142 144
     kTksbPtrArgIdx     = 1,
@@ -406,8 +408,10 @@ private:
406 408
   void          _newColumn( const cmDspUiHdr_t* m );
407 409
 
408 410
   void          _insertAudioSysCfgLabel(unsigned long idx, const cmChar_t* label );
411
+  void          _setDfltAudioSysCfg(unsigned long idx, const cmChar_t* label );
409 412
   void          _insertDeviceLabel( unsigned long idx, bool inputFl, const cmChar_t* label );
410 413
   void          _insertProgramLabel( unsigned long idx, const cmChar_t* label );
414
+  void          _setDfltProgram(unsigned long idx, const cmChar_t* label );
411 415
   void          _insertSubSysCnt( unsigned long subSysCnt );
412 416
   unsigned      _getCurAudioSubSysIdx();
413 417
   void          _setMenuButton( Fl_Menu_Button* b, unsigned value, const char* dfltLabel );

Loading…
Annulla
Salva