Pārlūkot izejas kodu

cmMsgProtocol.h/cmDspClass.h/cmDspUi.c : Added cmDspUi.c:cmDspProgram() is done to send a message to the host from the DSP process when the DSP program is done.

master
kevin 4 gadus atpakaļ
vecāks
revīzija
b81204a8d2
3 mainītis faili ar 10 papildinājumiem un 2 dzēšanām
  1. 2
    1
      src/cmMsgProtocol.h
  2. 4
    1
      src/dsp/cmDspClass.h
  3. 4
    0
      src/dsp/cmDspUi.c

+ 2
- 1
src/cmMsgProtocol.h Parādīt failu

@@ -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 Parādīt failu

@@ -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 Parādīt failu

@@ -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
+

Notiek ielāde…
Atcelt
Saglabāt