Browse Source

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

master
kevin 8 years ago
parent
commit
4994d375a1
2 changed files with 47 additions and 4 deletions
  1. 40
    1
      src/kc/kcApp.cpp
  2. 7
    3
      src/kc/kcApp.h

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

1164
         case kTmlnSelArgIdx:
1164
         case kTmlnSelArgIdx:
1165
           //tp->value( cmDsvStrcz(vp));
1165
           //tp->value( cmDsvStrcz(vp));
1166
           break;
1166
           break;
1167
-          
1167
+
1168
+        case kTmlnMeasArgIdx:
1169
+          cp->u.tmln.tlctl->setTimeLineSelectBar( cmDsvUInt(vp));
1170
+          break;
1171
+
1168
         case kTmlnCursArgIdx:
1172
         case kTmlnCursArgIdx:
1169
           cp->u.tmln.tlctl->setAudioFileCursor(cmDsvUInt(vp));
1173
           cp->u.tmln.tlctl->setAudioFileCursor(cmDsvUInt(vp));
1170
           break;
1174
           break;
1272
           _tlCtl->setScoreVarValue(cp->u.scor.locIdx,cp->u.scor.varId, cmDsvDouble(vp));
1276
           _tlCtl->setScoreVarValue(cp->u.scor.locIdx,cp->u.scor.varId, cmDsvDouble(vp));
1273
           break;
1277
           break;
1274
 
1278
 
1279
+        case kScorMeasArgIdx:
1280
+          _tlCtl->setScoreSelectBar( cmDsvUInt(vp));
1281
+          break;
1282
+          
1275
         default:
1283
         default:
1276
           { assert(0); }
1284
           { assert(0); }
1277
       }
1285
       }
1462
   _as_btn->add(label,0,NULL,(void*)idx,0);
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
 void kcApp::_insertDeviceLabel( unsigned long devIdx, bool inputFl, const cmChar_t* label )
1484
 void kcApp::_insertDeviceLabel( unsigned long devIdx, bool inputFl, const cmChar_t* label )
1466
 {
1485
 {
1467
   Fl_Menu_Button* bp = inputFl ? _ai_btn : _ao_btn;
1486
   Fl_Menu_Button* bp = inputFl ? _ai_btn : _ao_btn;
1481
   _pgm_btn->add(label,0,NULL,(void*)idx,0);
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
 void kcApp::_insertSubSysCnt( unsigned long subSysCnt )
1515
 void kcApp::_insertSubSysCnt( unsigned long subSysCnt )
1485
 {
1516
 {
1486
   long unsigned i;
1517
   long unsigned i;
1952
       _insertAudioSysCfgLabel(m->instId,cmDsvStrcz(&m->value));
1983
       _insertAudioSysCfgLabel(m->instId,cmDsvStrcz(&m->value));
1953
       break;
1984
       break;
1954
 
1985
 
1986
+    case kAudioSysCfgDfltDuiId:
1987
+      _setDfltAudioSysCfg(m->instId,cmDsvStrcz(&m->value));
1988
+      break;
1989
+      
1955
     case kDeviceDuiId:
1990
     case kDeviceDuiId:
1956
       _insertDeviceLabel(m->instId,m->flags,cmDsvStrcz(&m->value));
1991
       _insertDeviceLabel(m->instId,m->flags,cmDsvStrcz(&m->value));
1957
       break;
1992
       break;
1960
       _insertProgramLabel(m->instId,cmDsvStrcz(&m->value));
1995
       _insertProgramLabel(m->instId,cmDsvStrcz(&m->value));
1961
       break;
1996
       break;
1962
 
1997
 
1998
+    case kProgramDfltDuiId:
1999
+      _setDfltProgram(m->instId,cmDsvStrcz(&m->value));
2000
+      break;
2001
+      
1963
       // the below codes are used to notify the application 
2002
       // the below codes are used to notify the application 
1964
       // of changes in state of the audio DSP system
2003
       // of changes in state of the audio DSP system
1965
 
2004
 

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

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

Loading…
Cancel
Save