VirtualBox

Ignore:
Timestamp:
Jun 24, 2022 4:51:21 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151958
Message:

Main/FE: Added new audio driver type "default" to make it possible to move VMs (appliances) between different platforms without the need of changing the audio driver explicitly. When the "default" driver is selected, the best audio backend option for a platform will be used.

While at it, also added the "WAS" (Windows Audio Session) driver type for which we only had a hack so far. This now can be explicitly selected, also by the frontends. bugref:10051

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r95140 r95364  
    21592159            switch (enmDrvType)
    21602160            {
     2161                case AudioDriverType_Default:
     2162                    if (details == VMINFO_MACHINEREADABLE)
     2163                        pszDrv = "default";
     2164                    else
     2165                        pszDrv = Info::tr("Default");
     2166                    break;
    21612167                case AudioDriverType_Null:
    21622168                    if (details == VMINFO_MACHINEREADABLE)
     
    21642170                    else
    21652171                        pszDrv = Info::tr("Null");
    2166                     break;
    2167                 case AudioDriverType_WinMM:
    2168                     if (details == VMINFO_MACHINEREADABLE)
    2169                         pszDrv = "winmm";
    2170                     else
    2171                         pszDrv = "WINMM";
    2172                     break;
    2173                 case AudioDriverType_DirectSound:
    2174                     if (details == VMINFO_MACHINEREADABLE)
    2175                         pszDrv = "dsound";
    2176                     else
    2177                         pszDrv = "DSOUND";
    21782172                    break;
    21792173                case AudioDriverType_OSS:
     
    21942188                    else
    21952189                        pszDrv = "PulseAudio";
     2190                    break;
     2191                case AudioDriverType_WinMM:
     2192                    if (details == VMINFO_MACHINEREADABLE)
     2193                        pszDrv = "winmm";
     2194                    else
     2195                        pszDrv = "WINMM";
     2196                    break;
     2197                case AudioDriverType_DirectSound:
     2198                    if (details == VMINFO_MACHINEREADABLE)
     2199                        pszDrv = "dsound";
     2200                    else
     2201                        pszDrv = "DirectSound";
     2202                    break;
     2203                case AudioDriverType_WAS:
     2204                    if (details == VMINFO_MACHINEREADABLE)
     2205                        pszDrv = "was";
     2206                    else
     2207                        pszDrv = "Windows Audio Session (WAS)";
    21962208                    break;
    21972209                case AudioDriverType_CoreAudio:
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r95178 r95364  
    844844    switch (enmAudio)
    845845    {
    846         case AudioDriverType_Null:          psz = List::tr("Null"); break;
    847         case AudioDriverType_WinMM:         psz = "WinMM";          break;
    848         case AudioDriverType_OSS:           psz = "OSS";            break;
    849         case AudioDriverType_ALSA:          psz = "ALSA";           break;
    850         case AudioDriverType_DirectSound:   psz = "DirectSound";    break;
    851         case AudioDriverType_CoreAudio:     psz = "CoreAudio";      break;
    852         case AudioDriverType_MMPM:          psz = "MMPM";           break;
    853         case AudioDriverType_Pulse:         psz = "Pulse";          break;
    854         case AudioDriverType_SolAudio:      psz = "SolAudio";       break;
     846        case AudioDriverType_Default:       psz = List::tr("Default");     break;
     847        case AudioDriverType_Null:          psz = List::tr("Null");        break;
     848        case AudioDriverType_OSS:           psz = "OSS";                   break;
     849        case AudioDriverType_ALSA:          psz = "ALSA";                  break;
     850        case AudioDriverType_Pulse:         psz = "PulseAudio";            break;
     851        case AudioDriverType_WinMM:         psz = "WinMM";                 break;
     852        case AudioDriverType_DirectSound:   psz = "DirectSound";           break;
     853        case AudioDriverType_WAS:           psz = "Windows Audio Session"; break;
     854        case AudioDriverType_CoreAudio:     psz = "CoreAudio";             break;
     855        case AudioDriverType_SolAudio:      psz = "SolAudio";              break;
     856        case AudioDriverType_MMPM:          psz = "MMPM";                  break;
    855857        default:                            psz = List::tr("Unknown");
    856858    }
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r95140 r95364  
    25762576 * saved state. The GUI also might learn this trick if it doesn't use it
    25772577 * already. */
    2578 
    25792578                /* disable? */
    25802579                if (!RTStrICmp(ValueUnion.psz, "none"))
    25812580                {
    25822581                    CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(false));
     2582                }
     2583                else if (!RTStrICmp(ValueUnion.psz, "default"))
     2584                {
     2585                    CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Default));
     2586                    CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    25832587                }
    25842588                else if (!RTStrICmp(ValueUnion.psz, "null"))
     
    25982602                {
    25992603                    CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_DirectSound));
     2604                    CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
     2605                }
     2606                else if (!RTStrICmp(ValueUnion.psz, "was"))
     2607                {
     2608                    CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_was));
    26002609                    CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
    26012610                }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette