VirtualBox

Changeset 91576 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 5, 2021 4:09:36 PM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Sketched out setting the system's master volume on Windows via WASAPI (not enabled yet). ​bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp

    r91574 r91576  
    137137
    138138#else  /* !VBOX_WITH_AUDIO_ALSA */
     139
     140#if 0
     141    CoInitialize(NULL);
     142    CLSID CLSID_const MMDeviceEnumerator =_uuidof(MMDeviceEnumerator);
     143    IID IID_const IMMDeviceEnumerator = uuidof(IMMDeviceEnumerator);
     144        IMMDeviceEnumerator* pEnumerator;
     145        HRESULT hr = CoCreateInstance(CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, IID_IMMDeviceEnumerator, (void**)&pEnumerator);
     146    IMMDevice *pDevice;
     147        hr = pEnumerator->GetDefaultAudioEndpoint(EDataFlow::eRender, ERole::eConsole, &pDevice);
     148    IAudioSessionManager *pManager;
     149        IID IID_const IMMAudioSessionManager = uuidof(IAudioSessionManager);
     150        hr = pDevice->Activate(IID_IMMAudioSessionManager, CLSCTX_ALL, NULL, (void**)&pManager);
     151        ISimpleAudioVolume *pSimpleAudioVolume;
     152        hr = pManager->GetSimpleAudioVolume(NULL, true, &pSimpleAudioVolume);
     153    pSimpleAudioVolume->SetMasterVolume(1.0);
     154#endif
     155
    139156    RT_NOREF(uVolPercent);
    140157#endif /* VBOX_WITH_AUDIO_ALSA */
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