Merge pull request #312 from PortAudio/alsa_ignore_all_plugins
alsa: Option to ignore all ALSA plugin devices.
This commit is contained in:
commit
da20219f27
1 changed files with 7 additions and 1 deletions
|
|
@ -1067,6 +1067,10 @@ static int IgnorePlugin( const char *pluginId )
|
|||
static const char *ignoredPlugins[] = {"hw", "plughw", "plug", "dsnoop", "tee",
|
||||
"file", "null", "shm", "cards", "rate_convert", NULL};
|
||||
int i = 0;
|
||||
|
||||
if( getenv( "PA_ALSA_IGNORE_ALL_PLUGINS" ) && atoi( getenv( "PA_ALSA_IGNORE_ALL_PLUGINS") ) )
|
||||
return 1;
|
||||
|
||||
while( ignoredPlugins[i] )
|
||||
{
|
||||
if( !strcmp( pluginId, ignoredPlugins[i] ) )
|
||||
|
|
@ -1328,6 +1332,8 @@ static PaError BuildDeviceList( PaAlsaHostApiRepresentation *alsaApi )
|
|||
paInsufficientMemory );
|
||||
snprintf( deviceName, len, "%s: %s (%s)", cardName, infoName, buf );
|
||||
|
||||
PA_DEBUG(( "%s: Found device [%d]: %s\n", __FUNCTION__, numDeviceNames, deviceName ));
|
||||
|
||||
++numDeviceNames;
|
||||
if( !hwDevInfos || numDeviceNames > maxDeviceNames )
|
||||
{
|
||||
|
|
@ -1451,7 +1457,7 @@ static PaError BuildDeviceList( PaAlsaHostApiRepresentation *alsaApi )
|
|||
|
||||
PA_ENSURE( FillInDevInfo( alsaApi, hwInfo, blocking, devInfo, &devIdx ) );
|
||||
}
|
||||
assert( devIdx < numDeviceNames );
|
||||
assert( devIdx <= numDeviceNames );
|
||||
/* Now inspect 'dmix' and 'default' plugins */
|
||||
for( i = 0; i < numDeviceNames; ++i )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue