From b81204a8d22f1b91ea2764d258b43121d835a0b3 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 24 Aug 2020 09:48:30 -0400 Subject: [PATCH 1/2] 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. --- src/cmMsgProtocol.h | 3 ++- src/dsp/cmDspClass.h | 5 ++++- src/dsp/cmDspUi.c | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/cmMsgProtocol.h b/src/cmMsgProtocol.h index d4f29db..e96e96a 100644 --- a/src/cmMsgProtocol.h +++ b/src/cmMsgProtocol.h @@ -41,6 +41,7 @@ extern "C" { kDeviceDuiId, // ui<--eng device label kProgramDuiId, // ui<--eng program label kProgramDfltDuiId, // ui<--eng dflt program label + kPgmDoneDuiId, // ui<--end the program is done // The following selId's are used by cmAudDsp to indicate various commands. kSetAudioCfgDuiId, // 1) select an audio system setup @@ -54,7 +55,7 @@ extern "C" { kSendMsgDuiId, // forward msg to the audio system kDevReportDuiId, // print a device report kPrintPgmDuiId, // write the currently loaded pgm as a JSON file - + kRightAlignDuiId = 0, // label alignment id used by kLabelDuiId kLeftAlignDuiId, kCenterAlignDuiId diff --git a/src/dsp/cmDspClass.h b/src/dsp/cmDspClass.h index c1c4ed0..8d2da2e 100644 --- a/src/dsp/cmDspClass.h +++ b/src/dsp/cmDspClass.h @@ -390,6 +390,9 @@ extern "C" { // Used to transmit messages to the audio system. cmDspRC_t cmDspSendValueToAudioSys( cmDspCtx_t* ctx, unsigned msgTypeId, unsigned selId, unsigned valId, const cmDspValue_t* valPtr ); + // Notify the system that the program is done and can be shutdown + cmDspRC_t cmDspProgramIsDone( cmDspCtx_t* ctx ); + // The following functions are used to send message to the UI and are // implemented in cmDspUi.c. They are declared here because they are // visible to the cmDspInst functions which use them but are not available @@ -417,7 +420,7 @@ extern "C" { cmDspRC_t cmDspUiFnameCreate( cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned valVarId, unsigned patVarId, unsigned dirVarId ); cmDspRC_t cmDspUiMsgListCreate(cmDspCtx_t* ctx, cmDspInst_t* inst, unsigned height, unsigned listVarId, unsigned selVarId ); - + //) #ifdef __cplusplus diff --git a/src/dsp/cmDspUi.c b/src/dsp/cmDspUi.c index 2aff36c..4ae728f 100644 --- a/src/dsp/cmDspUi.c +++ b/src/dsp/cmDspUi.c @@ -188,6 +188,9 @@ cmDspRC_t _cmDspUiUseInstSymbolAsLabel( cmDspCtx_t* ctx, cmDspInst_t* inst, unsi cmDspRC_t cmDspSendValueToAudioSys( cmDspCtx_t* ctx, unsigned msgTypeId, unsigned selId, unsigned valId, const cmDspValue_t* valPtr ) { return _cmDspUiMsg(ctx, msgTypeId, selId, 0, NULL, valId, valPtr ); } +cmDspRC_t cmDspProgramIsDone( cmDspCtx_t* ctx ) +{ return _cmDspUiMsg(ctx, kUiSelAsId, kPgmDoneDuiId, 0, NULL, cmInvalidId, NULL ); } + cmDspRC_t cmDspUiConsolePrint( cmDspCtx_t* ctx, cmChar_t* text ) { cmDspValue_t v; @@ -514,3 +517,4 @@ cmDspRC_t cmDspUiNewPage( cmDspCtx_t* ctx, const cmChar_t* title ) return rc; } + From b93e3729eb67e5c24f37a3dd0f33d8a77492e3d9 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 13 Oct 2020 15:13:24 -0400 Subject: [PATCH 2/2] README.md : Initial commit. --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..2a987ef --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ + +libcm is a C application development framework with an emphasis on audio signal processing. +