VirtualBox

Changeset 88233 in vbox for trunk


Ignore:
Timestamp:
Mar 22, 2021 10:06:14 AM (4 years ago)
Author:
vboxsync
Message:

Audio: VBoxMMNotificationClient.* -> DrvHostAudioDSoundMMNotifClient.* bugref:9890

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

Legend:

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

    r88230 r88233  
    3636#ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
    3737# include <new> /* For bad_alloc. */
    38 # include "VBoxMMNotificationClient.h"
     38# include "DrvHostAudioDSoundMMNotifClient.h"
    3939#endif
    4040
     
    224224    LPDIRECTSOUNDCAPTURE8       pDSC;
    225225#ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
    226     VBoxMMNotificationClient   *m_pNotificationClient;
     226    DrvHostAudioDSoundMMNotifClient   *m_pNotificationClient;
    227227#endif
    228228#ifdef VBOX_WITH_AUDIO_CALLBACKS
     
    27132713        try
    27142714        {
    2715             pThis->m_pNotificationClient = new VBoxMMNotificationClient();
     2715            pThis->m_pNotificationClient = new DrvHostAudioDSoundMMNotifClient();
    27162716
    27172717            hr = pThis->m_pNotificationClient->Initialize();
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDSoundMMNotifClient.cpp

    r88232 r88233  
    11/* $Id$ */
    22/** @file
    3  * VBoxMMNotificationClient.cpp - Implementation of the IMMNotificationClient interface
     3 * DrvHostAudioDSoundMMNotifClient.cpp - Implementation of the IMMNotificationClient interface
    44 *                                to detect audio endpoint changes.
    55 */
     
    1717 */
    1818
    19 #include "VBoxMMNotificationClient.h"
     19#include "DrvHostAudioDSoundMMNotifClient.h"
    2020
    2121#include <iprt/win/windows.h>
     
    3030#include <VBox/log.h>
    3131
    32 VBoxMMNotificationClient::VBoxMMNotificationClient(void)
     32
     33DrvHostAudioDSoundMMNotifClient::DrvHostAudioDSoundMMNotifClient(void)
    3334    : m_fRegisteredClient(false)
    3435    , m_cRef(1)
     
    3637}
    3738
    38 VBoxMMNotificationClient::~VBoxMMNotificationClient(void)
     39DrvHostAudioDSoundMMNotifClient::~DrvHostAudioDSoundMMNotifClient(void)
    3940{
    4041}
     
    4344 * Registers the mulitmedia notification client implementation.
    4445 */
    45 HRESULT VBoxMMNotificationClient::Register(void)
     46HRESULT DrvHostAudioDSoundMMNotifClient::Register(void)
    4647{
    4748    HRESULT hr = m_pEnum->RegisterEndpointNotificationCallback(this);
     
    5960 * Unregisters the mulitmedia notification client implementation.
    6061 */
    61 void VBoxMMNotificationClient::Unregister(void)
     62void DrvHostAudioDSoundMMNotifClient::Unregister(void)
    6263{
    6364    DetachFromEndpoint();
     
    7677 * @return  HRESULT
    7778 */
    78 HRESULT VBoxMMNotificationClient::Initialize(void)
     79HRESULT DrvHostAudioDSoundMMNotifClient::Initialize(void)
    7980{
    8081    HRESULT hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), 0, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator),
     
    9293 * @param   pfnCallback         Audio callback to call by the notification client in case of new events.
    9394 */
    94 int VBoxMMNotificationClient::RegisterCallback(PPDMDRVINS pDrvIns, PFNPDMHOSTAUDIOCALLBACK pfnCallback)
     95int DrvHostAudioDSoundMMNotifClient::RegisterCallback(PPDMDRVINS pDrvIns, PFNPDMHOSTAUDIOCALLBACK pfnCallback)
    9596{
    9697    this->m_pDrvIns     = pDrvIns;
     
    104105 * with notifications.
    105106 */
    106 void VBoxMMNotificationClient::UnregisterCallback(void)
     107void DrvHostAudioDSoundMMNotifClient::UnregisterCallback(void)
    107108{
    108109    this->m_pDrvIns     = NULL;
     
    114115 * Does nothing at the moment.
    115116 */
    116 HRESULT VBoxMMNotificationClient::AttachToDefaultEndpoint(void)
     117HRESULT DrvHostAudioDSoundMMNotifClient::AttachToDefaultEndpoint(void)
    117118{
    118119    return S_OK;
     
    123124 * Does nothing at the moment.
    124125 */
    125 void VBoxMMNotificationClient::DetachFromEndpoint(void)
     126void DrvHostAudioDSoundMMNotifClient::DetachFromEndpoint(void)
    126127{
    127128
     
    131132 * Helper function for invoking the audio connector callback (if any).
    132133 */
    133 void VBoxMMNotificationClient::doCallback(void)
     134void DrvHostAudioDSoundMMNotifClient::doCallback(void)
    134135{
    135136#ifdef VBOX_WITH_AUDIO_CALLBACKS
     
    150151 * @param   dwNewState          New state the device is now in.
    151152 */
    152 STDMETHODIMP VBoxMMNotificationClient::OnDeviceStateChanged(LPCWSTR pwstrDeviceId, DWORD dwNewState)
     153STDMETHODIMP DrvHostAudioDSoundMMNotifClient::OnDeviceStateChanged(LPCWSTR pwstrDeviceId, DWORD dwNewState)
    153154{
    154155    char *pszState = "unknown";
     
    185186 * @param   pwstrDeviceId       Device ID which has been added.
    186187 */
    187 STDMETHODIMP VBoxMMNotificationClient::OnDeviceAdded(LPCWSTR pwstrDeviceId)
     188STDMETHODIMP DrvHostAudioDSoundMMNotifClient::OnDeviceAdded(LPCWSTR pwstrDeviceId)
    188189{
    189190    LogRel(("Audio: Device '%ls' has been added\n", pwstrDeviceId));
     
    198199 * @param   pwstrDeviceId       Device ID which has been removed.
    199200 */
    200 STDMETHODIMP VBoxMMNotificationClient::OnDeviceRemoved(LPCWSTR pwstrDeviceId)
     201STDMETHODIMP DrvHostAudioDSoundMMNotifClient::OnDeviceRemoved(LPCWSTR pwstrDeviceId)
    201202{
    202203    LogRel(("Audio: Device '%ls' has been removed\n", pwstrDeviceId));
     
    214215 * @param   pwstrDefaultDeviceId      ID of the new default device.
    215216 */
    216 STDMETHODIMP VBoxMMNotificationClient::OnDefaultDeviceChanged(EDataFlow eFlow, ERole eRole, LPCWSTR pwstrDefaultDeviceId)
     217STDMETHODIMP DrvHostAudioDSoundMMNotifClient::OnDefaultDeviceChanged(EDataFlow eFlow, ERole eRole, LPCWSTR pwstrDefaultDeviceId)
    217218{
    218219    RT_NOREF(eRole);
     
    232233}
    233234
    234 STDMETHODIMP VBoxMMNotificationClient::QueryInterface(REFIID interfaceID, void **ppvInterface)
     235STDMETHODIMP DrvHostAudioDSoundMMNotifClient::QueryInterface(REFIID interfaceID, void **ppvInterface)
    235236{
    236237    const IID MY_IID_IMMNotificationClient = __uuidof(IMMNotificationClient);
     
    248249}
    249250
    250 STDMETHODIMP_(ULONG) VBoxMMNotificationClient::AddRef(void)
     251STDMETHODIMP_(ULONG) DrvHostAudioDSoundMMNotifClient::AddRef(void)
    251252{
    252253    return InterlockedIncrement(&m_cRef);
    253254}
    254255
    255 STDMETHODIMP_(ULONG) VBoxMMNotificationClient::Release(void)
     256STDMETHODIMP_(ULONG) DrvHostAudioDSoundMMNotifClient::Release(void)
    256257{
    257258    long lRef = InterlockedDecrement(&m_cRef);
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDSoundMMNotifClient.h

    r88232 r88233  
    11/* $Id$ */
    22/** @file
    3  * VBoxMMNotificationClient.h - Implementation of the IMMNotificationClient interface
     3 * DrvHostAudioDSoundMMNotifClient.h - Implementation of the IMMNotificationClient interface
    44 *                              to detect audio endpoint changes.
    55 */
     
    1717 */
    1818
    19 #ifndef VBOX_INCLUDED_SRC_Audio_VBoxMMNotificationClient_h
    20 #define VBOX_INCLUDED_SRC_Audio_VBoxMMNotificationClient_h
     19#ifndef VBOX_INCLUDED_SRC_Audio_DrvHostAudioDSoundMMNotifClient_h
     20#define VBOX_INCLUDED_SRC_Audio_DrvHostAudioDSoundMMNotifClient_h
    2121#ifndef RT_WITHOUT_PRAGMA_ONCE
    2222# pragma once
     
    4040
    4141
    42 class VBoxMMNotificationClient : IMMNotificationClient
     42class DrvHostAudioDSoundMMNotifClient : IMMNotificationClient
    4343{
    4444public:
    4545
    46     VBoxMMNotificationClient();
    47     virtual ~VBoxMMNotificationClient();
     46    DrvHostAudioDSoundMMNotifClient();
     47    virtual ~DrvHostAudioDSoundMMNotifClient();
    4848
    4949    HRESULT Initialize();
     
    9494    /** @} */
    9595};
    96 #endif /* !VBOX_INCLUDED_SRC_Audio_VBoxMMNotificationClient_h */
     96#endif /* !VBOX_INCLUDED_SRC_Audio_DrvHostAudioDSoundMMNotifClient_h */
    9797
  • trunk/src/VBox/Devices/Makefile.kmk

    r88229 r88233  
    666666        Audio/DrvHostAudioDSound.cpp
    667667  ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
     668   VBoxDD_DEFS    += VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
    668669   VBoxDD_SOURCES += \
    669         Audio/VBoxMMNotificationClient.cpp
    670    VBoxDD_DEFS    += VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
     670        Audio/DrvHostAudioDSoundMMNotifClient.cpp
    671671  endif
    672672 endif
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