Changeset 70544 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jan 11, 2018 4:20:27 PM (7 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/AudioDriver.h
- Property svn:executable deleted
r70538 r70544 25 25 26 26 /** 27 * Audio driver configuration for audio drivers implemented 28 * in Main. 27 * Audio driver configuration for audio drivers implemented 28 * in Main. 29 29 */ 30 30 struct AudioDriverCfg 31 31 { 32 AudioDriverCfg(Utf8Str a_strDev = "", unsigned a_uInst = 0, unsigned a_uLUN = 0) 32 AudioDriverCfg(Utf8Str a_strDev = "", unsigned a_uInst = 0, unsigned a_uLUN = 0, 33 Utf8Str a_strName = "") 33 34 : strDev(a_strDev) 34 35 , uInst(a_uInst) 35 , uLUN(a_uLUN) { } 36 , uLUN(a_uLUN) 37 , strName(a_strName) { } 36 38 37 39 AudioDriverCfg& operator=(AudioDriverCfg that) 38 40 { 39 this->strDev = that.strDev; 40 this->uInst = that.uInst; 41 this->uLUN = that.uLUN; 41 this->strDev = that.strDev; 42 this->uInst = that.uInst; 43 this->uLUN = that.uLUN; 44 this->strName = that.strName; 42 45 43 46 return *this; … … 51 54 * Set the UINT8_MAX if not attached. */ 52 55 unsigned uLUN; 56 /** The driver name. */ 57 Utf8Str strName; 53 58 }; 54 59 … … 69 74 AudioDriverCfg *GetConfig(void) { return &mCfg; } 70 75 71 Console *GetParent(void) { return mpConsole; } 76 Console *GetParent(void) { return mpConsole; } 72 77 73 78 bool IsAttached(void) { return mfAttached; } … … 82 87 83 88 /** 84 * Optional (virtual) function to give the derived audio driver 85 * class the ability to add more driver configuration entries when 89 * Optional (virtual) function to give the derived audio driver 90 * class the ability to add more driver configuration entries when 86 91 * setting up. 87 * 88 * @param pLunCfg CFGM configuration node of the driver. 92 * 93 * @param pLunCfg CFGM configuration node of the driver. 89 94 */ 90 95 virtual void configureDriver(PCFGMNODE pLunCfg) { RT_NOREF(pLunCfg); } -
trunk/src/VBox/Main/src-client/AudioDriver.cpp
- Property svn:executable deleted
r70538 r70544 94 94 pCfg->uLUN = pThis->getFreeLUN(); 95 95 96 LogFunc(("strDevice=%s, uInst=%u, uLUN=%u\n", pCfg->strDev.c_str(), pCfg->uInst, pCfg->uLUN)); 96 LogFunc(("strName=%s, strDevice=%s, uInst=%u, uLUN=%u\n", 97 pCfg->strName.c_str(), pCfg->strDev.c_str(), pCfg->uInst, pCfg->uLUN)); 97 98 98 99 vrc = pThis->Configure(pCfg, true /* Attach */); … … 105 106 } 106 107 else 107 LogRel((" VRDE: Failed to attach audio driver, rc=%Rrc\n", vrc));108 LogRel(("%s: Failed to attach audio driver, rc=%Rrc\n", pCfg->strName.c_str(), vrc)); 108 109 109 110 return vrc; … … 131 132 AudioDriverCfg *pCfg = &pThis->mCfg; 132 133 133 LogFunc(("strDevice=%s, uInst=%u, uLUN=%u\n", pCfg->strDev.c_str(), pCfg->uInst, pCfg->uLUN)); 134 LogFunc(("strName=%s, strDevice=%s, uInst=%u, uLUN=%u\n", 135 pCfg->strName.c_str(), pCfg->strDev.c_str(), pCfg->uInst, pCfg->uLUN)); 134 136 135 137 vrc = PDMR3DriverDetach(ptrVM.rawUVM(), pCfg->strDev.c_str(), pCfg->uInst, pCfg->uLUN, "AUDIO", … … 145 147 } 146 148 else 147 LogRel((" VRDE: Failed to detach audio driver, rc=%Rrc\n", vrc));149 LogRel(("%s: Failed to detach audio driver, rc=%Rrc\n", pCfg->strName.c_str(), vrc)); 148 150 149 151 return vrc; … … 186 188 if (!pDevLun) 187 189 { 188 LogRel2((" VRDE: Configuring audio driver\n"));190 LogRel2(("%s: Configuring audio driver\n", mCfg.strName.c_str())); 189 191 190 192 PCFGMNODE pLunL0; … … 194 196 PCFGMNODE pLunCfg; 195 197 CFGMR3InsertNode(pLunL0, "Config", &pLunCfg); 196 CFGMR3InsertString (pLunCfg, "DriverName", "AudioVRDE");198 CFGMR3InsertStringF(pLunCfg, "DriverName", "%s", mCfg.strName.c_str()); 197 199 CFGMR3InsertInteger(pLunCfg, "InputEnabled", 0); /* Play safe by default. */ 198 200 CFGMR3InsertInteger(pLunCfg, "OutputEnabled", 1); … … 200 202 PCFGMNODE pLunL1; 201 203 CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); 202 CFGMR3InsertString (pLunL1, "Driver", "AudioVRDE");204 CFGMR3InsertStringF(pLunL1, "Driver", "%s", mCfg.strName.c_str()); 203 205 204 206 CFGMR3InsertNode(pLunL1, "Config", &pLunCfg); … … 212 214 if (pDevLun) 213 215 { 214 LogRel2((" VRDE: Unconfiguring audio driver\n"));216 LogRel2(("%s: Unconfiguring audio driver\n", mCfg.strName.c_str())); 215 217 CFGMR3RemoveNode(pDevLun); 216 218 } -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r70537 r70544 2975 2975 } 2976 2976 2977 AudioDriverCfg Cfg(strAudioDevice, 0 /* Instance */, uAudioLUN );2977 AudioDriverCfg Cfg(strAudioDevice, 0 /* Instance */, uAudioLUN, "AudioVRDE"); 2978 2978 rc = mAudioVRDE->Configure(&Cfg, RT_BOOL(fVRDEEnabled) /* Attach */); 2979 2979 if ( RT_SUCCESS(rc)
Note:
See TracChangeset
for help on using the changeset viewer.