VirtualBox

Changeset 73452 in vbox


Ignore:
Timestamp:
Aug 2, 2018 12:37:33 PM (6 years ago)
Author:
vboxsync
Message:

Audio: When setting the recording source, check if the selected driver has at least one input source available, otherwise skip to the next one.

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevHDA.cpp

    r73403 r73452  
    24332433                if (pStreamCfg->enmDir == PDMAUDIODIR_IN)
    24342434                {
    2435                     rc = AudioMixerSinkSetRecordingSource(pMixSink, pMixStrm);
    2436                     LogFlowFunc(("LUN#%RU8: Recording source is now \"%s\", rc=%Rrc\n", pDrv->uLUN, pStreamCfg->szName, rc));
    2437                     LogRel2(("HDA: Set recording source to '%s'\n", pStreamCfg->szName));
     2435                    PDMAUDIOBACKENDCFG Cfg;
     2436                    rc = pDrv->pConnector->pfnGetConfig(pDrv->pConnector, &Cfg);
     2437                    if (   RT_SUCCESS(rc)
     2438                        && Cfg.cMaxStreamsIn) /* At least one input source available? */
     2439                    {
     2440                        rc = AudioMixerSinkSetRecordingSource(pMixSink, pMixStrm);
     2441                        LogFlowFunc(("LUN#%RU8: Recording source is now '%s', rc=%Rrc\n", pDrv->uLUN, pStreamCfg->szName, rc));
     2442                        LogRel2(("HDA: Set recording source to '%s'\n", pStreamCfg->szName));
     2443                    }
     2444                    else if (RT_FAILURE(rc))
     2445                        LogFunc(("LUN#%RU8: Unable to retrieve backend configuratio for '%s', rc=%Rrc\n",
     2446                                 pDrv->uLUN, pStreamCfg->szName, rc));
    24382447                }
    24392448            }
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r73403 r73452  
    15711571                if (pStreamCfg->enmDir == PDMAUDIODIR_IN)
    15721572                {
    1573                     rc = AudioMixerSinkSetRecordingSource(pMixSink, pMixStrm);
    1574                     LogFlowFunc(("LUN#%RU8: Recording source is now \"%s\", rc=%Rrc\n", pDrv->uLUN, pStreamCfg->szName, rc));
    1575                     LogRel2(("HDA: Set recording source to '%s'\n", pStreamCfg->szName));
     1573                    PDMAUDIOBACKENDCFG Cfg;
     1574                    rc = pDrv->pConnector->pfnGetConfig(pDrv->pConnector, &Cfg);
     1575                    if (   RT_SUCCESS(rc)
     1576                        && Cfg.cMaxStreamsIn) /* At least one input source available? */
     1577                    {
     1578                        rc = AudioMixerSinkSetRecordingSource(pMixSink, pMixStrm);
     1579                        LogFlowFunc(("LUN#%RU8: Recording source is now '%s', rc=%Rrc\n", pDrv->uLUN, pStreamCfg->szName, rc));
     1580                        LogRel2(("AC97: Set recording source to '%s'\n", pStreamCfg->szName));
     1581                    }
     1582                    else if (RT_FAILURE(rc))
     1583                        LogFunc(("LUN#%RU8: Unable to retrieve backend configuratio for '%s', rc=%Rrc\n",
     1584                                 pDrv->uLUN, pStreamCfg->szName, rc));
    15761585                }
    15771586            }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette