Changeset 73239 in vbox for trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
- Timestamp:
- Jul 19, 2018 1:16:08 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r73000 r73239 2870 2870 } 2871 2871 2872 PCFGMNODE pCfgAudio Settings= NULL;2873 InsertConfigNode(pInst, "AudioConfig", &pCfgAudio Settings);2872 PCFGMNODE pCfgAudioAdapter = NULL; 2873 InsertConfigNode(pInst, "AudioConfig", &pCfgAudioAdapter); 2874 2874 SafeArray<BSTR> audioProps; 2875 2875 hrc = audioAdapter->COMGETTER(PropertiesList)(ComSafeArrayAsOutParam(audioProps)); H(); … … 2882 2882 hrc = audioAdapter->GetProperty(audioProps[i], bstrValue.asOutParam()); 2883 2883 Utf8Str strKey(audioProps[i]); 2884 InsertConfigString(pCfgAudio Settings, strKey.c_str(), bstrValue);2884 InsertConfigString(pCfgAudioAdapter, strKey.c_str(), bstrValue); 2885 2885 } 2886 2886 … … 2959 2959 unsigned uAudioLUN = 0; 2960 2960 2961 BOOL fAudioEnabledIn = FALSE; 2962 hrc = audioAdapter->COMGETTER(EnabledIn)(&fAudioEnabledIn); H(); 2963 BOOL fAudioEnabledOut = FALSE; 2964 hrc = audioAdapter->COMGETTER(EnabledOut)(&fAudioEnabledOut); H(); 2965 2966 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN++); 2967 InsertConfigString(pLunL0, "Driver", "AUDIO"); 2968 2969 InsertConfigNode(pLunL0, "Config", &pCfg); 2970 InsertConfigString (pCfg, "DriverName", strAudioDriver.c_str()); 2971 InsertConfigInteger(pCfg, "InputEnabled", fAudioEnabledIn); 2972 InsertConfigInteger(pCfg, "OutputEnabled", fAudioEnabledOut); 2973 InsertConfigInteger(pCfg, "DebugEnabled", fDebugEnabled); 2974 InsertConfigString (pCfg, "DebugPathOut", strDebugPathOut); 2975 2976 InsertConfigNode(pLunL0, "AttachedDriver", &pLunL1); 2977 2978 InsertConfigNode(pLunL1, "Config", &pCfg); 2979 2980 hrc = pMachine->COMGETTER(Name)(bstr.asOutParam()); H(); 2981 InsertConfigString(pCfg, "StreamName", bstr); 2982 2983 InsertConfigString(pLunL1, "Driver", strAudioDriver.c_str()); 2961 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN); 2962 rc = i_configAudioDriver(audioAdapter, virtualBox, pMachine, pLunL0, 2963 strAudioDriver.c_str()); 2964 if (RT_SUCCESS(rc)) 2965 uAudioLUN++; 2984 2966 2985 2967 #ifdef VBOX_WITH_AUDIO_VRDE … … 3006 2988 { 3007 2989 #ifdef VBOX_WITH_AUDIO_DEBUG 3008 /* 3009 * The audio debugging backend. 3010 */ 3011 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN++); 3012 InsertConfigString(pLunL0, "Driver", "AUDIO"); 3013 3014 InsertConfigNode(pLunL0, "Config", &pCfg); 3015 InsertConfigString (pCfg, "DriverName", "DebugAudio"); 3016 InsertConfigInteger(pCfg, "InputEnabled", fAudioEnabledIn); 3017 InsertConfigInteger(pCfg, "OutputEnabled", fAudioEnabledOut); 3018 InsertConfigInteger(pCfg, "DebugEnabled", fDebugEnabled); 3019 InsertConfigString (pCfg, "DebugPathOut", strDebugPathOut); 3020 3021 InsertConfigNode(pLunL0, "AttachedDriver", &pLunL1); 3022 3023 InsertConfigString(pLunL1, "Driver", "DebugAudio"); 3024 InsertConfigNode (pLunL1, "Config", &pCfg); 2990 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN); 2991 rc = i_configAudioDriver(audioAdapter, virtualBox, pMachine, pLunL0, 2992 "DebugAudio"); 2993 if (RT_SUCCESS(rc)) 2994 uAudioLUN++; 3025 2995 #endif /* VBOX_WITH_AUDIO_DEBUG */ 3026 2996 … … 3047 3017 * The ValidationKit backend. 3048 3018 */ 3049 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN++); 3050 InsertConfigString(pLunL0, "Driver", "AUDIO"); 3051 InsertConfigNode(pLunL0, "Config", &pCfg); 3052 InsertConfigString (pCfg, "DriverName", "ValidationKitAudio"); 3053 InsertConfigInteger(pCfg, "InputEnabled", fAudioEnabledIn); 3054 InsertConfigInteger(pCfg, "OutputEnabled", fAudioEnabledOut); 3055 InsertConfigInteger(pCfg, "DebugEnabled", fDebugEnabled); 3056 InsertConfigString (pCfg, "DebugPathOut", strDebugPathOut); 3057 3058 InsertConfigNode(pLunL0, "AttachedDriver", &pLunL1); 3059 3060 InsertConfigString(pLunL1, "Driver", "ValidationKitAudio"); 3061 InsertConfigNode (pLunL1, "Config", &pCfg); 3062 InsertConfigString(pCfg, "StreamName", bstr); 3019 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN); 3020 rc = i_configAudioDriver(audioAdapter, virtualBox, pMachine, pLunL0, 3021 "ValidationKitAudio"); 3022 if (RT_SUCCESS(rc)) 3023 uAudioLUN++; 3063 3024 #endif /* VBOX_WITH_AUDIO_VALIDATIONKIT */ 3064 3025 } … … 3465 3426 3466 3427 return rc; 3428 } 3429 3430 int Console::i_configAudioDriver(IAudioAdapter *pAudioAdapter, IVirtualBox *pVirtualBox, IMachine *pMachine, 3431 PCFGMNODE pLUN, const char *pszDriverName) 3432 { 3433 #define H() AssertLogRelMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR) 3434 3435 HRESULT hrc; 3436 3437 Utf8Str strTmp; 3438 GetExtraDataBoth(pVirtualBox, pMachine, "VBoxInternal2/Audio/Debug/Enabled", &strTmp); 3439 const uint64_t fDebugEnabled = (strTmp.equalsIgnoreCase("true") || strTmp.equalsIgnoreCase("1")) ? 1 : 0; 3440 3441 Utf8Str strDebugPathOut; 3442 GetExtraDataBoth(pVirtualBox, pMachine, "VBoxInternal2/Audio/Debug/PathOut", &strDebugPathOut); 3443 3444 BOOL fAudioEnabledIn = FALSE; 3445 hrc = pAudioAdapter->COMGETTER(EnabledIn)(&fAudioEnabledIn); H(); 3446 BOOL fAudioEnabledOut = FALSE; 3447 hrc = pAudioAdapter->COMGETTER(EnabledOut)(&fAudioEnabledOut); 3448 3449 InsertConfigString(pLUN, "Driver", "AUDIO"); 3450 3451 PCFGMNODE pCfg; 3452 InsertConfigNode(pLUN, "Config", &pCfg); 3453 InsertConfigString (pCfg, "DriverName", pszDriverName); 3454 InsertConfigInteger(pCfg, "InputEnabled", fAudioEnabledIn); 3455 InsertConfigInteger(pCfg, "OutputEnabled", fAudioEnabledOut); 3456 InsertConfigInteger(pCfg, "DebugEnabled", fDebugEnabled); 3457 InsertConfigString (pCfg, "DebugPathOut", strDebugPathOut.c_str()); 3458 3459 PCFGMNODE pLunL1; 3460 InsertConfigNode(pLUN, "AttachedDriver", &pLunL1); 3461 3462 InsertConfigNode(pLunL1, "Config", &pCfg); 3463 3464 Bstr bstrTmp; 3465 hrc = pMachine->COMGETTER(Name)(bstrTmp.asOutParam()); H(); 3466 InsertConfigString(pCfg, "StreamName", bstrTmp); 3467 3468 InsertConfigString(pLunL1, "Driver", pszDriverName); 3469 3470 LogFlowFunc(("szDrivName=%s, hrc=%Rhrc\n", pszDriverName, hrc)); 3471 return hrc; 3472 3473 #undef H 3467 3474 } 3468 3475
Note:
See TracChangeset
for help on using the changeset viewer.