Переглянути джерело

Merge branch 'develop' of gitea.larke.org:klarke/libcm into develop

master
kevin 4 роки тому
джерело
коміт
af855ac168
4 змінених файлів з 13 додано та 2 видалено
  1. 3
    0
      README.md
  2. 2
    1
      src/cmMsgProtocol.h
  3. 4
    1
      src/dsp/cmDspClass.h
  4. 4
    0
      src/dsp/cmDspUi.c

+ 3
- 0
README.md Переглянути файл

@@ -0,0 +1,3 @@
1
+
2
+libcm is a C application development framework with an emphasis on audio signal processing.
3
+

+ 2
- 1
src/cmMsgProtocol.h Переглянути файл

@@ -41,6 +41,7 @@ extern "C" {
41 41
     kDeviceDuiId,          // ui<--eng device label
42 42
     kProgramDuiId,         // ui<--eng program label
43 43
     kProgramDfltDuiId,     // ui<--eng dflt program label
44
+    kPgmDoneDuiId,         // ui<--end the program is done 
44 45
     
45 46
     // The following selId's are used by cmAudDsp to indicate various commands.
46 47
     kSetAudioCfgDuiId,     // 1) select an audio system setup
@@ -54,7 +55,7 @@ extern "C" {
54 55
     kSendMsgDuiId,         // forward msg to the audio system
55 56
     kDevReportDuiId,       // print a device report
56 57
     kPrintPgmDuiId,        // write the currently loaded pgm as a JSON file
57
-
58
+    
58 59
     kRightAlignDuiId = 0,  // label alignment id used by kLabelDuiId 
59 60
     kLeftAlignDuiId,  
60 61
     kCenterAlignDuiId

+ 4
- 1
src/dsp/cmDspClass.h Переглянути файл

@@ -390,6 +390,9 @@ extern "C" {
390 390
   // Used to transmit messages to the audio system.
391 391
   cmDspRC_t  cmDspSendValueToAudioSys( cmDspCtx_t* ctx, unsigned msgTypeId, unsigned selId, unsigned valId, const cmDspValue_t* valPtr ); 
392 392
 
393
+  // Notify the system that the program is done and can be shutdown
394
+  cmDspRC_t cmDspProgramIsDone( cmDspCtx_t* ctx );
395
+  
393 396
   // The following functions are used to send message to the UI and are 
394 397
   // implemented in cmDspUi.c.  They are declared here because they are 
395 398
   // visible to the cmDspInst functions which use them but are not available
@@ -417,7 +420,7 @@ extern "C" {
417 420
   cmDspRC_t   cmDspUiFnameCreate(  cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned valVarId, unsigned patVarId, unsigned dirVarId );
418 421
   cmDspRC_t   cmDspUiMsgListCreate(cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned height, unsigned listVarId, unsigned selVarId );
419 422
 
420
- 
423
+  
421 424
   //)
422 425
   
423 426
 #ifdef __cplusplus

+ 4
- 0
src/dsp/cmDspUi.c Переглянути файл

@@ -188,6 +188,9 @@ cmDspRC_t _cmDspUiUseInstSymbolAsLabel( cmDspCtx_t* ctx, cmDspInst_t* inst, unsi
188 188
 cmDspRC_t  cmDspSendValueToAudioSys( cmDspCtx_t* ctx, unsigned msgTypeId, unsigned selId, unsigned valId, const cmDspValue_t* valPtr )
189 189
 { return _cmDspUiMsg(ctx, msgTypeId, selId, 0, NULL, valId, valPtr ); }
190 190
 
191
+cmDspRC_t cmDspProgramIsDone( cmDspCtx_t* ctx )
192
+{ return _cmDspUiMsg(ctx, kUiSelAsId, kPgmDoneDuiId, 0, NULL, cmInvalidId, NULL ); }
193
+
191 194
 cmDspRC_t   cmDspUiConsolePrint( cmDspCtx_t* ctx, cmChar_t* text )
192 195
 {
193 196
   cmDspValue_t v;
@@ -514,3 +517,4 @@ cmDspRC_t  cmDspUiNewPage(          cmDspCtx_t* ctx, const cmChar_t* title )
514 517
 
515 518
   return rc;
516 519
 }
520
+

Завантаження…
Відмінити
Зберегти