Added cmAudDspLocalSendSetup() and cmAudDspSendSetup()

This commit is contained in:
kpl 2012-11-24 10:32:12 -08:00
parent fd40c2a213
commit e1fcbfea28
4 changed files with 41 additions and 12 deletions

View File

@ -612,18 +612,6 @@ cmAdRC_t cmAudDspAlloc( cmCtx_t* ctx, cmAdH_t* hp, cmMsgSendFuncPtr_t cbFunc, vo
p->curAsCfgIdx = cmInvalidIdx;
p->ctx = *ctx;
// notify the client of the available audio system configurations
if((rc = _cmAdSendAudioSysCfgLabels(p)) != kOkAdRC )
goto errLabel;
// notify the client of the available devices
if((rc = _cmAdSendDeviceLabels(p)) != kOkAdRC)
goto errLabel;
// notify the client of the available programs
if((rc = _cmAdSendProgramLabels(p)) != kOkAdRC )
goto errLabel;
hp->h = p;
@ -653,6 +641,27 @@ cmAdRC_t cmAudDspFree( cmAdH_t* hp )
return rc;
}
cmAdRC_t cmAudDspSendSetup( cmAdH_t h )
{
cmAdRC_t rc = kOkAdRC;
cmAd_t* p = _cmAdHandleToPtr( h );
// notify the client of the available audio system configurations
if((rc = _cmAdSendAudioSysCfgLabels(p)) != kOkAdRC )
goto errLabel;
// notify the client of the available devices
if((rc = _cmAdSendDeviceLabels(p)) != kOkAdRC)
goto errLabel;
// notify the client of the available programs
if((rc = _cmAdSendProgramLabels(p)) != kOkAdRC )
goto errLabel;
errLabel:
return rc;
}
bool cmAudDspIsValid( cmAdH_t h )
{ return h.h != NULL; }

View File

@ -40,6 +40,9 @@ extern "C" {
cmAdRC_t cmAudDspAlloc( cmCtx_t* ctx, cmAdH_t* hp, cmMsgSendFuncPtr_t cbPtr, void* cbDataPtr );
cmAdRC_t cmAudDspFree( cmAdH_t* hp );
// Send the setup to the UI (device list,system cfg list, DSP programs)
cmAdRC_t cmAudDspSendSetup( cmAdH_t h );
bool cmAudDspIsValid( cmAdH_t h );
// This function provides the primary interface for communication from the

View File

@ -136,6 +136,21 @@ cmAdlRC_t cmAudDspLocalFree( cmAdlH_t* hp )
return rc;
}
cmAdlRC_t cmAudDspLocalSendSetup( cmAdlH_t h )
{
cmAdlRC_t rc = kOkAdlRC;
cmAdl_t* p = _cmAdlHandleToPtr(h);
if( cmAudDspSendSetup(p->adH) != kOkAdRC )
{
rc = cmErrMsg(&p->err,kAudDspFailAdlRC,"The audio DSP system setup request failed.");
goto errLabel;
}
errLabel:
return rc;
}
bool cmAudDspLocalIsValid( cmAdlH_t h )
{ return h.h != NULL; }

View File

@ -26,6 +26,8 @@ extern "C" {
cmAdlRC_t cmAudDspLocalFree( cmAdlH_t* hp );
cmAdlRC_t cmAudDspLocalSendSetup( cmAdlH_t h );
bool cmAudDspLocalIsValid( cmAdlH_t h );
cmAiH_t cmAudDspLocalIF_Handle( cmAdlH_t h );