|
@@ -148,15 +148,18 @@ cmAiRC_t _cmAdIfReadCfgFile( cmAi_t* p, cmCtx_t* ctx )
|
148
|
148
|
}
|
149
|
149
|
|
150
|
150
|
|
151
|
|
-cmAiRC_t _cmAdIfSendIntMsg(cmAiH_t h, unsigned selId, unsigned asSubIdx, unsigned flags, unsigned iv, double dv )
|
|
151
|
+cmAiRC_t _cmAdIfSendIntMsg(cmAiH_t h, unsigned selId, unsigned asSubIdx, unsigned flags, unsigned iv, double dv, const cmChar_t* str )
|
152
|
152
|
{
|
153
|
153
|
cmAi_t* p = _cmAiHandleToPtr( h );
|
154
|
154
|
cmDspValue_t v;
|
155
|
155
|
|
156
|
|
- if(iv == cmInvalidIdx )
|
157
|
|
- cmDsvSetDouble(&v,dv);
|
|
156
|
+ if(str != NULL )
|
|
157
|
+ cmDsvSetStrcz(&v,str);
|
158
|
158
|
else
|
159
|
|
- cmDsvSetUInt(&v,iv);
|
|
159
|
+ if(iv == cmInvalidIdx )
|
|
160
|
+ cmDsvSetDouble(&v,dv);
|
|
161
|
+ else
|
|
162
|
+ cmDsvSetUInt(&v,iv);
|
160
|
163
|
|
161
|
164
|
if( cmMsgSend(&p->err,asSubIdx,kUiSelAsId,selId,flags,cmInvalidId,cmInvalidId,&v,p->parms.audDspFunc,p->parms.audDspFuncDataPtr) != kOkMsgRC )
|
162
|
165
|
return cmErrMsg(&p->err,kSendFailAiRC,"The integer message sel id:%i value:%i transmission failed.",selId,iv);
|
|
@@ -245,25 +248,29 @@ cmAiRC_t cmAdIfRecvAudDspMsg( cmAiH_t h, unsigned msgByteCnt, const void*
|
245
|
248
|
}
|
246
|
249
|
|
247
|
250
|
cmAiRC_t cmAdIfDeviceReport( cmAiH_t h )
|
248
|
|
-{ return _cmAdIfSendIntMsg(h,kDevReportDuiId,cmInvalidIdx,0,cmInvalidIdx,0.0); }
|
|
251
|
+{ return _cmAdIfSendIntMsg(h,kDevReportDuiId,cmInvalidIdx,0,cmInvalidIdx,0.0,NULL); }
|
249
|
252
|
|
250
|
253
|
cmAiRC_t cmAdIfSetAudioSysCfg( cmAiH_t h, unsigned asCfgIdx )
|
251
|
|
-{ return _cmAdIfSendIntMsg(h,kSetAudioCfgDuiId,cmInvalidIdx,0,asCfgIdx,0.0); }
|
|
254
|
+{ return _cmAdIfSendIntMsg(h,kSetAudioCfgDuiId,cmInvalidIdx,0,asCfgIdx,0.0,NULL); }
|
252
|
255
|
|
253
|
256
|
cmAiRC_t cmAdIfSetAudioDevice( cmAiH_t h, unsigned asSubIdx, bool inputFl, unsigned devIdx )
|
254
|
|
-{ return _cmAdIfSendIntMsg(h,kSetAudioDevDuiId,asSubIdx,inputFl,devIdx,0.0); }
|
|
257
|
+{ return _cmAdIfSendIntMsg(h,kSetAudioDevDuiId,asSubIdx,inputFl,devIdx,0.0,NULL); }
|
255
|
258
|
|
256
|
259
|
cmAiRC_t cmAdIfSetSampleRate( cmAiH_t h, unsigned asSubIdx, double srate )
|
257
|
|
-{ return _cmAdIfSendIntMsg(h,kSetSampleRateDuiId,asSubIdx,0,cmInvalidIdx,srate); }
|
|
260
|
+{ return _cmAdIfSendIntMsg(h,kSetSampleRateDuiId,asSubIdx,0,cmInvalidIdx,srate,NULL); }
|
258
|
261
|
|
259
|
262
|
cmAiRC_t cmAdIfLoadProgram( cmAiH_t h, unsigned asSubIdx, unsigned pgmIdx )
|
260
|
|
-{ return _cmAdIfSendIntMsg(h,kSetPgmDuiId,asSubIdx,0,pgmIdx,0.0); }
|
|
263
|
+{ return _cmAdIfSendIntMsg(h,kSetPgmDuiId,asSubIdx,0,pgmIdx,0.0,NULL); }
|
|
264
|
+
|
|
265
|
+cmAiRC_t cmAdIfPrintPgm( cmAiH_t h,unsigned asSubIdx, const cmChar_t* fn )
|
|
266
|
+{ return _cmAdIfSendIntMsg(h,kPrintPgmDuiId,asSubIdx,0,cmInvalidIdx,0.0,fn); }
|
|
267
|
+
|
261
|
268
|
|
262
|
269
|
cmAiRC_t cmAdIfEnableAudio( cmAiH_t h, bool enableFl )
|
263
|
|
-{ return _cmAdIfSendIntMsg(h,kEnableDuiId,cmInvalidIdx,enableFl,cmInvalidIdx,0.0); }
|
|
270
|
+{ return _cmAdIfSendIntMsg(h,kEnableDuiId,cmInvalidIdx,enableFl,cmInvalidIdx,0.0,NULL); }
|
264
|
271
|
|
265
|
272
|
cmAiRC_t cmAdIfEnableStatusNotify( cmAiH_t h, bool enableFl )
|
266
|
|
-{ return _cmAdIfSendIntMsg(h,kSetNotifyEnableDuiId,cmInvalidIdx,enableFl,cmInvalidIdx,0.0); }
|
|
273
|
+{ return _cmAdIfSendIntMsg(h,kSetNotifyEnableDuiId,cmInvalidIdx,enableFl,cmInvalidIdx,0.0,NULL); }
|
267
|
274
|
|
268
|
275
|
cmAiRC_t cmAdIfSendMsgToAudioDSP(
|
269
|
276
|
cmAiH_t h,
|
|
@@ -287,5 +294,5 @@ cmAiRC_t cmAdIfSendMsgToAudioDSP(
|
287
|
294
|
|
288
|
295
|
|
289
|
296
|
cmAiRC_t cmAdIfDispatchMsgToHost( cmAiH_t h )
|
290
|
|
-{ return _cmAdIfSendIntMsg(h,kClientMsgPollDuiId,cmInvalidIdx,0,cmInvalidIdx,0.0); }
|
|
297
|
+{ return _cmAdIfSendIntMsg(h,kClientMsgPollDuiId,cmInvalidIdx,0,cmInvalidIdx,0.0,NULL); }
|
291
|
298
|
|