VirtualBox

Changeset 62056 in vbox for trunk


Ignore:
Timestamp:
Jul 6, 2016 2:24:20 PM (9 years ago)
Author:
vboxsync
Message:

Audio: More cleanup for backend defines.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r62006 r62056  
    434434# Enable new PS/2 mouse emulation.
    435435VBOX_WITH_NEW_PS2M = 1
    436 # Enable OSS audio support.
    437 VBOX_WITH_OSS = 1
    438 # Enable ALSA audio support.
    439 VBOX_WITH_ALSA = 1
    440 # Enable PulseAudio audio support.
    441 VBOX_WITH_PULSE = 1
     436ifn1of ($(KBUILD_TARGET), win darwin)
     437 # Enable OSS audio support.
     438 VBOX_WITH_OSS = 1
     439endif
     440if1of ($(KBUILD_TARGET), linux)
     441 # Enable ALSA audio support.
     442 VBOX_WITH_ALSA = 1
     443endif
     444if1of ($(KBUILD_TARGET), linux)
     445 # Enable PulseAudio audio support.
     446 VBOX_WITH_PULSE = 1
     447endif
    442448# Enable PCI passthrough support.
    443449VBOX_WITH_PCI_PASSTHROUGH = 1
  • trunk/src/VBox/Devices/build/VBoxDD.h

    r61339 r62056  
    55
    66/*
    7  * Copyright (C) 2006-2015 Oracle Corporation
     7 * Copyright (C) 2006-2016 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    122122extern const PDMDRVREG g_DrvHostDSound;
    123123#endif
    124 #if defined(RT_OS_LINUX)
     124#ifdef VBOX_WITH_OSS
     125extern const PDMDRVREG g_DrvHostOSSAudio;
     126#endif
     127#ifdef VBOX_WITH_ALSA
     128extern const PDMDRVREG g_DrvHostALSAAudio;
     129#endif
     130#ifdef VBOX_WITH_PULSE
    125131extern const PDMDRVREG g_DrvHostPulseAudio;
    126 extern const PDMDRVREG g_DrvHostALSAAudio;
    127 extern const PDMDRVREG g_DrvHostOSSAudio;
    128132#endif
    129133#if defined(RT_OS_DARWIN)
    130134extern const PDMDRVREG g_DrvHostCoreAudio;
    131 #endif
    132 #if defined(RT_OS_SOLARIS)
    133 extern const PDMDRVREG g_DrvHostOSSAudio;
    134 extern const PDMDRVREG g_DrvHostSolAudio;
    135 #endif
    136 #if defined(RT_OS_FREEBSD)
    137 extern const PDMDRVREG g_DrvHostOSSAudio;
    138135#endif
    139136extern const PDMDRVREG g_DrvACPI;
  • trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk

    r56465 r62056  
    55
    66#
    7 # Copyright (C) 2006-2015 Oracle Corporation
     7# Copyright (C) 2006-2016 Oracle Corporation
    88#
    99# This file is part of VirtualBox Open Source Edition (OSE), as
     
    2121VBOX_COMMON_VBOXMANAGE_DEFS = \
    2222        $(if $(VBOX_WITH_AHCI), VBOX_WITH_AHCI) \
    23         $(if $(VBOX_WITH_ALSA), VBOX_WITH_ALSA) \
    2423        $(if $(VBOX_WITH_COPYTOGUEST),VBOX_WITH_COPYTOGUEST) \
    2524        $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \
     
    3029        $(if $(VBOX_WITH_HOSTNETIF_API), VBOX_WITH_HOSTNETIF_API) \
    3130        $(if $(VBOX_WITH_NETFLT), VBOX_WITH_NETFLT) \
     31        $(if $(VBOX_WITH_OSS), VBOX_WITH_OSS) \
     32        $(if $(VBOX_WITH_ALSA), VBOX_WITH_ALSA) \
    3233        $(if $(VBOX_WITH_PULSE),VBOX_WITH_PULSE) \
    3334        $(if $(VBOX_WITH_SCSI), VBOX_WITH_SCSI) \
    34         $(if $(VBOX_WITH_SOLARIS_OSS), VBOX_WITH_SOLARIS_OSS) \
    3535        $(if $(VBOX_WITH_VBOXSDL), VBOX_WITH_VBOXSDL) \
    3636        $(if $(VBOX_WITH_VIDEOHWACCEL), VBOX_WITH_VIDEOHWACCEL) \
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r61937 r62056  
    797797#else
    798798            RTStrmPrintf(pStrm, "|dsound");
    799 #endif
    800799        }
    801         if (fSolaris)
     800        if (fLinux || fSolaris)
    802801        {
    803             RTStrmPrintf(pStrm, "|solaudio"
    804 #ifdef VBOX_WITH_SOLARIS_OSS
    805                                     "|oss"
    806 #endif
    807                         );
    808         }
    809         if (fLinux)
    810         {
     802#ifdef VBOX_WITH_OSS
    811803            RTStrmPrintf(pStrm, "|oss"
     804#endif
    812805#ifdef VBOX_WITH_ALSA
    813                                     "|alsa"
     806                                "|alsa"
    814807#endif
    815808#ifdef VBOX_WITH_PULSE
    816                                     "|pulse"
     809                                "|pulse"
    817810#endif
    818811                        );
     
    820813        if (fFreeBSD)
    821814        {
     815#ifdef VBOX_WITH_OSS
    822816            /* Get the line break sorted when dumping all option variants. */
    823817            if (fDumpOpts)
     
    828822            else
    829823                RTStrmPrintf(pStrm, "|oss");
     824#endif
    830825#ifdef VBOX_WITH_PULSE
    831826            RTStrmPrintf(pStrm, "|pulse");
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r61042 r62056  
    22862286                }
    22872287#endif /* RT_OS_WINDOWS */
    2288 #ifdef RT_OS_LINUX
    2289 # ifdef VBOX_WITH_ALSA
     2288#ifdef VBOX_WITH_OSS
     2289                else if (!RTStrICmp(ValueUnion.psz, "oss"))
     2290                {
     2291                    CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
     2292                    CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
     2293                }
     2294#endif
     2295#ifdef VBOX_WITH_ALSA
    22902296                else if (!RTStrICmp(ValueUnion.psz, "alsa"))
    22912297                {
     
    22932299                    CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    22942300                }
    2295 # endif
    2296 # ifdef VBOX_WITH_PULSE
     2301#endif
     2302#ifdef VBOX_WITH_PULSE
    22972303                else if (!RTStrICmp(ValueUnion.psz, "pulse"))
    22982304                {
     
    23002306                    CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    23012307                }
    2302 # endif
    2303 #endif /* !RT_OS_LINUX */
    2304 #ifdef RT_OS_SOLARIS
    2305                 else if (!RTStrICmp(ValueUnion.psz, "solaudio"))
    2306                 {
    2307                     CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_SolAudio));
    2308                     CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    2309                 }
    2310 #endif /* !RT_OS_SOLARIS */
    2311 #ifdef RT_OS_FREEBSD
    2312                 else if (!RTStrICmp(ValueUnion.psz, "oss"))
    2313                 {
    2314                     CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
    2315                     CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    2316                 }
    2317 # ifdef VBOX_WITH_PULSE
    2318                 else if (!RTStrICmp(ValueUnion.psz, "pulse"))
    2319                 {
    2320                     CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse));
    2321                     CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    2322                 }
    2323 # endif
    2324 #endif /* !RT_OS_FREEBSD */
     2308#endif
    23252309#ifdef RT_OS_DARWIN
    23262310                else if (!RTStrICmp(ValueUnion.psz, "coreaudio"))
     
    23292313                    CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    23302314                }
    2331 
    23322315#endif /* !RT_OS_DARWIN */
    2333 # if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(VBOX_WITH_SOLARIS_OSS)
    2334                 else if (!RTStrICmp(ValueUnion.psz, "oss"))
    2335                 {
    2336                     CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS));
    2337                     CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    2338                 }
    2339 # endif
    23402316                else
    23412317                {
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp

    r52730 r62056  
    55
    66/*
    7  * Copyright (C) 2006-2013 Oracle Corporation
     7 * Copyright (C) 2006-2016 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    153153#endif /* Q_OS_WIN */
    154154
    155 #ifdef Q_OS_SOLARIS
    156     m_pComboAudioDriver->setItemText(++iIndex, gpConverter->toString(KAudioDriverType_SolAudio));
    157 # ifdef VBOX_WITH_SOLARIS_OSS
     155#ifdef VBOX_WITH_OSS
    158156    m_pComboAudioDriver->setItemText(++iIndex, gpConverter->toString(KAudioDriverType_OSS));
    159 # endif /* VBOX_WITH_SOLARIS_OSS */
    160 #endif /* Q_OS_SOLARIS */
    161 
    162 #if defined Q_OS_LINUX || defined Q_OS_FREEBSD
    163     m_pComboAudioDriver->setItemText(++iIndex, gpConverter->toString(KAudioDriverType_OSS));
    164 # ifdef VBOX_WITH_PULSE
     157#endif
     158
     159#ifdef VBOX_WITH_ALSA
     160    m_pComboAudioDriver->setItemText(++iIndex, gpConverter->toString(KAudioDriverType_ALSA));
     161#endif
     162
     163#ifdef VBOX_WITH_PULSE
    165164    m_pComboAudioDriver->setItemText(++iIndex, gpConverter->toString(KAudioDriverType_Pulse));
    166 # endif /* VBOX_WITH_PULSE */
    167 #endif /* Q_OS_LINUX | Q_OS_FREEBSD */
    168 
    169 #ifdef Q_OS_LINUX
    170 # ifdef VBOX_WITH_ALSA
    171     m_pComboAudioDriver->setItemText(++iIndex, gpConverter->toString(KAudioDriverType_ALSA));
    172 # endif /* VBOX_WITH_ALSA */
    173 #endif /* Q_OS_LINUX */
     165#endif
    174166
    175167#ifdef Q_OS_MACX
     
    220212# endif /* VBOX_WITH_WINMM */
    221213#endif /* Q_OS_WIN */
    222 
    223 #ifdef Q_OS_SOLARIS
    224     m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_SolAudio);
    225 # ifdef VBOX_WITH_SOLARIS_OSS
     214#ifdef VBOX_WITH_OSS
    226215    m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_OSS);
    227 # endif /* VBOX_WITH_SOLARIS_OSS */
    228 #endif /* Q_OS_SOLARIS */
    229 
    230 #if defined Q_OS_LINUX || defined Q_OS_FREEBSD
    231     m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_OSS);
    232 # ifdef VBOX_WITH_PULSE
     216#endif
     217#ifdef VBOX_WITH_ALSA
     218    m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_ALSA);
     219#endif /* VBOX_WITH_ALSA */
     220#ifdef VBOX_WITH_PULSE
    233221    m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_Pulse);
    234 # endif /* VBOX_WITH_PULSE */
    235 #endif /* Q_OS_LINUX | Q_OS_FREEBSD */
    236 
    237 #ifdef Q_OS_LINUX
    238 # ifdef VBOX_WITH_ALSA
    239     m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_ALSA);
    240 # endif /* VBOX_WITH_ALSA */
    241 #endif /* Q_OS_LINUX */
    242 
     222#endif /* VBOX_WITH_PULSE */
    243223#ifdef Q_OS_MACX
    244224    m_pComboAudioDriver->insertItem(++iIndex, "", KAudioDriverType_CoreAudio);
    245225#endif /* Q_OS_MACX */
    246226
    247 
    248227    /* Prepare audio-controller combo.
    249228     * Make sure this order corresponds the same in retranslateUi(): */
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r61930 r62056  
    28792879                }
    28802880#endif
     2881#ifdef VBOX_WITH_OSS
     2882                case AudioDriverType_OSS:
     2883                {
     2884                    InsertConfigString(pLunL1, "Driver", "OSSAudio");
     2885                    break;
     2886                }
     2887#endif
    28812888#ifdef VBOX_WITH_ALSA
    28822889                case AudioDriverType_ALSA:
     
    28902897                {
    28912898                    InsertConfigString(pLunL1, "Driver", "PulseAudio");
    2892                     break;
    2893                 }
    2894 #endif
    2895 #ifdef VBOX_WITH_OSS
    2896                 case AudioDriverType_OSS:
    2897                 {
    2898                     InsertConfigString(pLunL1, "Driver", "OSSAudio");
    28992899                    break;
    29002900                }
  • trunk/src/VBox/Main/xml/Settings.cpp

    r61912 r62056  
    66996699        case AudioDriverType_DirectSound:
    67006700#endif
     6701#ifdef VBOX_WITH_OSS
     6702        case AudioDriverType_OSS:
     6703#endif
    67016704#ifdef VBOX_WITH_ALSA
    67026705        case AudioDriverType_ALSA:
     
    67046707#ifdef VBOX_WITH_PULSE
    67056708        case AudioDriverType_Pulse:
    6706 #endif
    6707 #ifdef VBOX_WITH_OSS
    6708         case AudioDriverType_OSS:
    67096709#endif
    67106710#ifdef RT_OS_DARWIN
     
    67326732#if defined(RT_OS_WINDOWS)
    67336733    return AudioDriverType_DirectSound;
    6734 #elif defined(RT_OS_SOLARIS)
    6735 # ifdef VBOX_WITH_OSS
    6736     return AudioDriverType_OSS;
    6737 # endif
    67386734#elif defined(RT_OS_LINUX)
    67396735    /* On Linux, we need to check at runtime what's actually supported. */
     
    67636759#elif defined(RT_OS_OS2)
    67646760    return AudioDriverType_MMPM;
    6765 #elif defined(RT_OS_FREEBSD)
     6761#else /* All other platforms. */
    67666762# ifdef VBOX_WITH_OSS
    67676763    return AudioDriverType_OSS;
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