Explorar el Código

Added cmAudDspLocalSendSetup() and cmAudDspSendSetup()

master
kpl hace 12 años
padre
commit
e1fcbfea28
Se han modificado 4 ficheros con 41 adiciones y 12 borrados
  1. 21
    12
      cmAudDsp.c
  2. 3
    0
      cmAudDsp.h
  3. 15
    0
      cmAudDspLocal.c
  4. 2
    0
      cmAudDspLocal.h

+ 21
- 12
cmAudDsp.c Ver fichero

@@ -612,18 +612,6 @@ cmAdRC_t cmAudDspAlloc( cmCtx_t* ctx, cmAdH_t* hp, cmMsgSendFuncPtr_t cbFunc, vo
612 612
   p->curAsCfgIdx = cmInvalidIdx;
613 613
   p->ctx         = *ctx;
614 614
   
615
-  // notify the client of the available audio system configurations
616
-  if((rc =  _cmAdSendAudioSysCfgLabels(p)) != kOkAdRC )
617
-    goto errLabel;
618
-
619
-  // notify the client of the available devices
620
-  if((rc =  _cmAdSendDeviceLabels(p)) != kOkAdRC) 
621
-    goto errLabel;
622
-
623
-  // notify the client of the available programs
624
-  if((rc = _cmAdSendProgramLabels(p)) != kOkAdRC )
625
-    goto errLabel;
626
-   
627 615
 
628 616
   hp->h          = p;
629 617
 
@@ -653,6 +641,27 @@ cmAdRC_t cmAudDspFree( cmAdH_t* hp )
653 641
   return rc;
654 642
 }
655 643
 
644
+cmAdRC_t cmAudDspSendSetup( cmAdH_t h )
645
+{
646
+  cmAdRC_t rc = kOkAdRC;
647
+  cmAd_t* p = _cmAdHandleToPtr( h );
648
+
649
+  // notify the client of the available audio system configurations
650
+  if((rc =  _cmAdSendAudioSysCfgLabels(p)) != kOkAdRC )
651
+    goto errLabel;
652
+
653
+  // notify the client of the available devices
654
+  if((rc =  _cmAdSendDeviceLabels(p)) != kOkAdRC) 
655
+    goto errLabel;
656
+
657
+  // notify the client of the available programs
658
+  if((rc = _cmAdSendProgramLabels(p)) != kOkAdRC )
659
+    goto errLabel;
660
+   
661
+ errLabel:
662
+  return rc;
663
+}
664
+
656 665
 bool cmAudDspIsValid( cmAdH_t h )
657 666
 { return h.h != NULL; }
658 667
 

+ 3
- 0
cmAudDsp.h Ver fichero

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

+ 15
- 0
cmAudDspLocal.c Ver fichero

@@ -136,6 +136,21 @@ cmAdlRC_t cmAudDspLocalFree( cmAdlH_t* hp )
136 136
   return rc;
137 137
 }
138 138
 
139
+cmAdlRC_t cmAudDspLocalSendSetup( cmAdlH_t h )
140
+{
141
+  cmAdlRC_t rc = kOkAdlRC;
142
+  cmAdl_t* p = _cmAdlHandleToPtr(h);
143
+  if( cmAudDspSendSetup(p->adH) != kOkAdRC )
144
+  {
145
+    rc = cmErrMsg(&p->err,kAudDspFailAdlRC,"The audio DSP system setup request failed.");
146
+    goto errLabel;
147
+  }
148
+
149
+ errLabel:
150
+  return rc;
151
+}
152
+
153
+
139 154
 bool      cmAudDspLocalIsValid( cmAdlH_t h )
140 155
 { return h.h != NULL; }
141 156
 

+ 2
- 0
cmAudDspLocal.h Ver fichero

@@ -26,6 +26,8 @@ extern "C" {
26 26
 
27 27
   cmAdlRC_t cmAudDspLocalFree( cmAdlH_t* hp );
28 28
 
29
+  cmAdlRC_t cmAudDspLocalSendSetup( cmAdlH_t h );
30
+
29 31
   bool      cmAudDspLocalIsValid( cmAdlH_t h );
30 32
 
31 33
   cmAiH_t   cmAudDspLocalIF_Handle( cmAdlH_t h );

Loading…
Cancelar
Guardar