VirtualBox

Changeset 88959 in vbox


Ignore:
Timestamp:
May 10, 2021 7:19:31 AM (4 years ago)
Author:
vboxsync
Message:

Audio/VaKit: Added driver backends for MacOS and Windows. bugref:10008

Location:
trunk/src/VBox
Files:
5 edited

Legend:

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

    r88887 r88959  
    2525#include <VBox/vmm/pdmaudiohostenuminline.h>
    2626
    27 #include "VBoxDD.h"
     27#ifdef VBOX_AUDIO_VKAT
     28# include "VBoxDDVKAT.h"
     29#else
     30# include "VBoxDD.h"
     31#endif
    2832
    2933#include <iprt/asm.h>
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDSound.cpp

    r88887 r88959  
    3636#include <VBox/vmm/pdmaudiohostenuminline.h>
    3737
    38 #include "VBoxDD.h"
     38#ifdef VBOX_AUDIO_VKAT
     39# include "VBoxDDVKAT.h"
     40#else
     41# include "VBoxDD.h"
     42#endif
     43
    3944#ifdef VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT
    4045# include <new> /* For bad_alloc. */
  • trunk/src/VBox/Devices/Audio/DrvHostAudioWasApi.cpp

    r88887 r88959  
    4545#include <new> /* std::bad_alloc */
    4646
    47 #include "VBoxDD.h"
     47#ifdef VBOX_AUDIO_VKAT
     48# include "VBoxDDVKAT.h"
     49#else
     50# include "VBoxDD.h"
     51#endif
    4852
    4953
  • trunk/src/VBox/Devices/Audio/VBoxDDVKAT.h

    r88958 r88959  
    150150extern const PDMDRVREG g_DrvHostOSSAudio;
    151151#endif
     152#if defined(RT_OS_WINDOWS)
     153extern const PDMDRVREG g_DrvHostAudioWas;
     154extern const PDMDRVREG g_DrvHostDSound;
     155#endif
     156#if defined(RT_OS_DARWIN)
     157extern const PDMDRVREG g_DrvHostCoreAudio;
     158#endif
    152159
    153160#endif /* !VBOX_INCLUDED_SRC_Audio_VBoxDDVKAT_h */
  • trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp

    r88958 r88959  
    503503                    pDrvReg = &g_DrvHostOSSAudio;
    504504#endif
    505                 /** @todo Add more backends here. */
    506 
     505#if defined(RT_OS_DARWIN)
     506                if (   !RTStrICmp(ValueUnion.psz, "coreaudio"))
     507                    pDrvReg = &g_DrvHostCoreAudio;
     508#endif
     509#if defined(RT_OS_WINDOWS)
     510                if (        !RTStrICmp(ValueUnion.psz, "wasapi"))
     511                    pDrvReg = &g_DrvHostAudioWas;
     512                else if (   !RTStrICmp(ValueUnion.psz, "directsound")
     513                         || !RTStrICmp(ValueUnion.psz, "dsound")
     514                    pDrvReg = &g_DrvHostDSound;
     515#endif
    507516                if (pDrvReg == NULL)
    508517                    return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Invalid / unsupported backend '%s' specified\n", ValueUnion.psz);
     
    585594    RTTestBanner(g_hTest);
    586595
    587     /* If no backend is specified, go with the ALSA one by default. */
     596    /* If no backend is specified, go with the default backend for that OS. */
    588597    if (pDrvReg == NULL)
     598#if defined(RT_OS_WINDOWS)
     599        pDrvReg = &g_DrvHostAudioWas;
     600#elif defined(RT_OS_DARWIN)
     601        pDrvReg = &g_DrvHostCoreAudio;
     602#elif defined(RT_OS_SOLARIS)
     603        pDrvReg = &g_DrvHostOSSAudio;
     604#else
    589605        pDrvReg = &g_DrvHostALSAAudio;
     606#endif
    590607
    591608    PPDMIHOSTAUDIO pDrvAudio;
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