diff --git a/cmAudioPort.c b/cmAudioPort.c index 57080cf..672ba0d 100644 --- a/cmAudioPort.c +++ b/cmAudioPort.c @@ -202,7 +202,7 @@ cmApRC_t cmApFinalize() unsigned cmApDeviceCount() { return _ap->devCnt; } -const char* cmApDeviceLabel( unsigned devIdx ) +const char* cmApDeviceLabel( unsigned devIdx ) { cmApDriver_t* dp; unsigned di; @@ -217,6 +217,20 @@ const char* cmApDeviceLabel( unsigned devIdx ) return dp->deviceLabel(di); } +unsigned cmApDeviceLabelToIndex( const cmChar_t* label ) +{ + unsigned n = cmApDeviceCount(); + unsigned i; + for(i=0; i