Changeset 73612 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Aug 10, 2018 10:16:36 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r73611 r73612 3430 3430 3431 3431 /** 3432 * Retrieves an uint32_t value from audio's extra data branch and returns a default value 3433 * if not found or an invalid value is found. 3432 * Retrieves an uint32_t value from the audio driver's extra data branch 3433 * (VBoxInternal2/Audio/<DriverName>/<Value>), or, if not found, use global branch 3434 * (VBoxInternal2/Audio/<Value>). 3435 * 3436 * The driver branch always supersedes the global branch. 3437 * If both branches are not found (empty), return the given default value. 3434 3438 * 3435 3439 * @return VBox status code. … … 3443 3447 const char *pszDriverName, const char *pszValue, uint32_t uDefault) 3444 3448 { 3445 Utf8StrFmt strPath("VBoxInternal2/Audio/%s/%s", pszDriverName, pszValue);3446 3447 3449 Utf8Str strTmp; 3448 GetExtraDataBoth(pVirtualBox, pMachine, strPath.c_str(), &strTmp); 3449 3450 if (strTmp.isNotEmpty()) 3450 3451 Utf8StrFmt strPathDrv("VBoxInternal2/Audio/%s/%s", pszDriverName, pszValue); 3452 GetExtraDataBoth(pVirtualBox, pMachine, strPathDrv.c_str(), &strTmp); 3453 if (strTmp.isEmpty()) 3454 { 3455 Utf8StrFmt strPathGlobal("VBoxInternal2/Audio/%s", pszValue); 3456 GetExtraDataBoth(pVirtualBox, pMachine, strPathGlobal.c_str(), &strTmp); 3457 if (strTmp.isNotEmpty()) 3458 return strTmp.toUInt32(); 3459 } 3460 else /* Return driver-specific value. */ 3451 3461 return strTmp.toUInt32(); 3452 3462
Note:
See TracChangeset
for help on using the changeset viewer.