|
@@ -202,7 +202,7 @@ cmApRC_t cmApFinalize()
|
202
|
202
|
unsigned cmApDeviceCount()
|
203
|
203
|
{ return _ap->devCnt; }
|
204
|
204
|
|
205
|
|
-const char* cmApDeviceLabel( unsigned devIdx )
|
|
205
|
+const char* cmApDeviceLabel( unsigned devIdx )
|
206
|
206
|
{
|
207
|
207
|
cmApDriver_t* dp;
|
208
|
208
|
unsigned di;
|
|
@@ -217,6 +217,20 @@ const char* cmApDeviceLabel( unsigned devIdx )
|
217
|
217
|
return dp->deviceLabel(di);
|
218
|
218
|
}
|
219
|
219
|
|
|
220
|
+unsigned cmApDeviceLabelToIndex( const cmChar_t* label )
|
|
221
|
+{
|
|
222
|
+ unsigned n = cmApDeviceCount();
|
|
223
|
+ unsigned i;
|
|
224
|
+ for(i=0; i<n; ++i)
|
|
225
|
+ {
|
|
226
|
+ const cmChar_t* s = cmApDeviceLabel(i);
|
|
227
|
+ if( s!=NULL && strcmp(s,label)==0)
|
|
228
|
+ return i;
|
|
229
|
+ }
|
|
230
|
+ return cmInvalidIdx;
|
|
231
|
+}
|
|
232
|
+
|
|
233
|
+
|
220
|
234
|
unsigned cmApDeviceChannelCount( unsigned devIdx, bool inputFl )
|
221
|
235
|
{
|
222
|
236
|
cmApDriver_t* dp;
|