VirtualBox

Ignore:
Timestamp:
Jul 31, 2018 8:59:13 AM (6 years ago)
Author:
vboxsync
Message:

Audio/Mixer: Added support for setting / getting an (input) sink's current recording source via AudioMixerSink[Get|Set]RecordingSource().

File:
1 edited

Legend:

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

    r73209 r73403  
    24212421        PAUDMIXSTREAM pMixStrm;
    24222422        rc = AudioMixerSinkCreateStream(pMixSink, pDrv->pConnector, pStreamCfg, 0 /* fFlags */, &pMixStrm);
     2423        LogFlowFunc(("LUN#%RU8: Created stream \"%s\" for sink, rc=%Rrc\n", pDrv->uLUN, pStreamCfg->szName, rc));
    24232424        if (RT_SUCCESS(rc))
    24242425        {
    24252426            rc = AudioMixerSinkAddStream(pMixSink, pMixStrm);
    2426             LogFlowFunc(("LUN#%RU8: Added \"%s\" to sink, rc=%Rrc\n", pDrv->uLUN, pStreamCfg->szName, rc));
     2427            LogFlowFunc(("LUN#%RU8: Added stream \"%s\" to sink, rc=%Rrc\n", pDrv->uLUN, pStreamCfg->szName, rc));
     2428            if (RT_SUCCESS(rc))
     2429            {
     2430                /* If this is an input stream, always set the latest (added) stream
     2431                 * as the recording source.
     2432                 * @todo Make the recording source dynamic (CFGM?). */
     2433                if (pStreamCfg->enmDir == PDMAUDIODIR_IN)
     2434                {
     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));
     2438                }
     2439            }
    24272440        }
    24282441
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