Changeset 62979 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Aug 4, 2016 11:12:14 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp
r62973 r62979 253 253 254 254 default: 255 AssertMsgFailed(("Wave format % ld not supported\n", pCfg->enmFormat));255 AssertMsgFailed(("Wave format %d not supported\n", pCfg->enmFormat)); 256 256 return VERR_NOT_SUPPORTED; 257 257 } … … 305 305 } 306 306 307 static char *dsoundGUIDToUtf8StrA(LPCGUID lpGUID)308 { 309 if ( lpGUID)307 static char *dsoundGUIDToUtf8StrA(LPCGUID pGUID) 308 { 309 if (pGUID) 310 310 { 311 311 LPOLESTR lpOLEStr; 312 HRESULT hr = StringFromCLSID(* lpGUID, &lpOLEStr);312 HRESULT hr = StringFromCLSID(*pGUID, &lpOLEStr); 313 313 if (SUCCEEDED(hr)) 314 314 { … … 549 549 AssertPtrReturn(pDSoundStream, E_POINTER); 550 550 551 DSLOG(("DSound: pDSoundStream=%p, cbBufferOut=% ld, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",551 DSLOG(("DSound: pDSoundStream=%p, cbBufferOut=%RU32, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n", 552 552 pDSoundStream, 553 553 pThis->cfg.cbBufferOut, … … 1016 1016 AssertPtrReturn(pDSoundStream, E_POINTER); 1017 1017 1018 DSLOG(("DSound: pDSoundStream=%p, cbBufferIn=% ld, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n",1018 DSLOG(("DSound: pDSoundStream=%p, cbBufferIn=%RU32, uHz=%RU32, cChannels=%RU8, cBits=%RU8, fSigned=%RTbool\n", 1019 1019 pDSoundStream, 1020 1020 pThis->cfg.cbBufferIn, … … 1213 1213 } 1214 1214 1215 static int dsoundDevAdd(PRTLISTANCHOR pList, LPGUID lpGUID, LPCWSTR lpwstrDescription, PDSOUNDDEV *ppDev)1215 static int dsoundDevAdd(PRTLISTANCHOR pList, LPGUID pGUID, LPCWSTR pwszDescription, PDSOUNDDEV *ppDev) 1216 1216 { 1217 1217 AssertPtrReturn(pList, VERR_INVALID_POINTER); 1218 AssertPtrReturn( lpGUID, VERR_INVALID_POINTER);1219 AssertPtrReturn( lpwstrDescription, VERR_INVALID_POINTER);1218 AssertPtrReturn(pGUID, VERR_INVALID_POINTER); 1219 AssertPtrReturn(pwszDescription, VERR_INVALID_POINTER); 1220 1220 1221 1221 PDSOUNDDEV pDev = (PDSOUNDDEV)RTMemAlloc(sizeof(DSOUNDDEV)); … … 1223 1223 return VERR_NO_MEMORY; 1224 1224 1225 int rc = RTUtf16ToUtf8( lpwstrDescription, &pDev->pszName);1225 int rc = RTUtf16ToUtf8(pwszDescription, &pDev->pszName); 1226 1226 if (RT_SUCCESS(rc)) 1227 memcpy(&pDev->Guid, lpGUID, sizeof(GUID));1227 memcpy(&pDev->Guid, pGUID, sizeof(GUID)); 1228 1228 1229 1229 if (RT_SUCCESS(rc)) … … 1249 1249 } 1250 1250 1251 static void dsoundLogDevice(const char *pszType, LPGUID lpGUID, LPCWSTR lpwstrDescription, LPCWSTR lpwstrModule)1252 { 1253 char *pszGUID = dsoundGUIDToUtf8StrA( lpGUID);1251 static void dsoundLogDevice(const char *pszType, LPGUID pGUID, LPCWSTR pwszDescription, LPCWSTR pwszModule) 1252 { 1253 char *pszGUID = dsoundGUIDToUtf8StrA(pGUID); 1254 1254 /* This always has to be in the release log. */ 1255 LogRel(("DSound: %s: GUID: %s [%ls] (Module: %ls)\n", 1256 pszType, pszGUID? pszGUID: "{?}", lpwstrDescription, lpwstrModule)); 1255 LogRel(("DSound: %s: GUID: %s [%ls] (Module: %ls)\n", pszType, pszGUID ? pszGUID : "{?}", pwszDescription, pwszModule)); 1257 1256 RTStrFree(pszGUID); 1258 1257 } 1259 1258 1260 static BOOL CALLBACK dsoundDevicesEnumCbPlayback(LPGUID lpGUID, LPCWSTR lpwstrDescription, LPCWSTR lpwstrModule, PVOID lpContext)1259 static BOOL CALLBACK dsoundDevicesEnumCbPlayback(LPGUID pGUID, LPCWSTR pwszDescription, LPCWSTR pwszModule, PVOID lpContext) 1261 1260 { 1262 1261 PDSOUNDENUMCBCTX pCtx = (PDSOUNDENUMCBCTX)lpContext; … … 1264 1263 AssertPtrReturn(pCtx->pDrv, FALSE); 1265 1264 1266 if (! lpGUID)1265 if (!pGUID) 1267 1266 return TRUE; 1268 1267 1269 AssertPtrReturn( lpwstrDescription, FALSE);1270 /* Do not care about lpwstrModule. */1268 AssertPtrReturn(pwszDescription, FALSE); 1269 /* Do not care about pwszModule. */ 1271 1270 1272 1271 if (pCtx->fFlags & DSOUNDENUMCBFLAGS_LOG) 1273 dsoundLogDevice("Output", lpGUID, lpwstrDescription, lpwstrModule);1272 dsoundLogDevice("Output", pGUID, pwszDescription, pwszModule); 1274 1273 1275 1274 int rc = dsoundDevAdd(&pCtx->pDrv->lstDevOutput, 1276 lpGUID, lpwstrDescription, NULL /* ppDev */);1275 pGUID, pwszDescription, NULL /* ppDev */); 1277 1276 if (RT_FAILURE(rc)) 1278 1277 return FALSE; /* Abort enumeration. */ … … 1283 1282 } 1284 1283 1285 static BOOL CALLBACK dsoundDevicesEnumCbCapture(LPGUID lpGUID, LPCWSTR lpwstrDescription, LPCWSTR lpwstrModule, PVOID lpContext)1284 static BOOL CALLBACK dsoundDevicesEnumCbCapture(LPGUID pGUID, LPCWSTR pwszDescription, LPCWSTR pwszModule, PVOID lpContext) 1286 1285 { 1287 1286 PDSOUNDENUMCBCTX pCtx = (PDSOUNDENUMCBCTX)lpContext; … … 1289 1288 AssertPtrReturn(pCtx->pDrv, FALSE); 1290 1289 1291 if (! lpGUID)1290 if (!pGUID) 1292 1291 return TRUE; 1293 1292 1294 1293 if (pCtx->fFlags & DSOUNDENUMCBFLAGS_LOG) 1295 dsoundLogDevice("Input", lpGUID, lpwstrDescription, lpwstrModule);1294 dsoundLogDevice("Input", pGUID, pwszDescription, pwszModule); 1296 1295 1297 1296 int rc = dsoundDevAdd(&pCtx->pDrv->lstDevInput, 1298 lpGUID, lpwstrDescription, NULL /* ppDev */);1297 pGUID, pwszDescription, NULL /* ppDev */); 1299 1298 if (RT_FAILURE(rc)) 1300 1299 return FALSE; /* Abort enumeration. */
Note:
See TracChangeset
for help on using the changeset viewer.