Changeset 59263 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Jan 6, 2016 2:12:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp
r59103 r59263 248 248 { 249 249 if (hr != DSERR_BUFFERLOST) /* Avoid log flooding if the error is still there. */ 250 DSLOGREL(("DSound: Playback: GetCurrentPosition failed with %Rhrc\n", hr));250 DSLOGREL(("DSound: Getting current playback position failed with %Rhrc\n", hr)); 251 251 LogFlowFunc(("Failed with %Rhrc\n", hr)); 252 252 return VERR_NOT_AVAILABLE; … … 304 304 HRESULT hr = IDirectSoundBuffer8_Restore(pDSB); 305 305 if (FAILED(hr)) 306 DSLOGREL(("DSound: Restor e playback buffer%Rhrc\n", hr));306 DSLOGREL(("DSound: Restoring playback buffer failed with %Rhrc\n", hr)); 307 307 return hr; 308 308 } … … 314 314 HRESULT hr = IDirectSoundBuffer8_Unlock(pDSB, pv1, cb1, pv2, cb2); 315 315 if (FAILED(hr)) 316 DSLOGREL(("DSound: Unlock playback buffer%Rhrc\n", hr));316 DSLOGREL(("DSound: Unlocking playback buffer failed with %Rhrc\n", hr)); 317 317 return hr; 318 318 } … … 324 324 HRESULT hr = IDirectSoundCaptureBuffer8_Unlock(pDSCB, pv1, cb1, pv2, cb2); 325 325 if (FAILED(hr)) 326 DSLOGREL(("DSound: Unlock capture buffer%Rhrc\n", hr));326 DSLOGREL(("DSound: Unlocking capture buffer failed with %Rhrc\n", hr)); 327 327 return hr; 328 328 } … … 351 351 if (FAILED(hr)) 352 352 { 353 DSLOGREL(("DSound: Lock playback buffer%Rhrc\n", hr));353 DSLOGREL(("DSound: Locking playback buffer failed with %Rhrc\n", hr)); 354 354 return hr; 355 355 } … … 387 387 if (FAILED(hr)) 388 388 { 389 DSLOGREL(("DSound: Lock capture buffer%Rhrc\n", hr));389 DSLOGREL(("DSound: Locking capture buffer failed with %Rhrc\n", hr)); 390 390 return hr; 391 391 } … … 434 434 if (FAILED(hr)) 435 435 { 436 DSLOGREL(("DSound: Creat e DirectSound instance%Rhrc\n", hr));436 DSLOGREL(("DSound: Creating playback instance failed with %Rhrc\n", hr)); 437 437 } 438 438 else … … 444 444 hr = IDirectSound8_SetCooperativeLevel(pDSoundStrmOut->pDS, hWnd, DSSCL_PRIORITY); 445 445 if (FAILED(hr)) 446 DSLOGREL(("DSound: Set cooperative level for window %p%Rhrc\n", hWnd, hr));446 DSLOGREL(("DSound: Setting cooperative level for window %p failed with %Rhrc\n", hWnd, hr)); 447 447 } 448 448 … … 452 452 DSLOGREL(("DSound: DirectSound playback is currently unavailable\n")); 453 453 else 454 DSLOGREL(("DSound: DirectSound playback initializ e%Rhrc\n", hr));454 DSLOGREL(("DSound: DirectSound playback initialization failed with %Rhrc\n", hr)); 455 455 456 456 directSoundPlayInterfaceRelease(pDSoundStrmOut); … … 519 519 { 520 520 /* Should not happen but be forgiving. */ 521 DSLOGREL(("DSound: DirectSoundBuffer already exists\n"));521 DSLOGREL(("DSound: Playback buffer already exists\n")); 522 522 directSoundPlayClose(pThis, pDSoundStrmOut); 523 523 } … … 549 549 if (FAILED(hr)) 550 550 { 551 DSLOGREL(("DSound: Creat eSoundBuffer%Rhrc\n", hr));551 DSLOGREL(("DSound: Creating playback sound buffer failed with %Rhrc\n", hr)); 552 552 break; 553 553 } … … 558 558 if (FAILED(hr)) 559 559 { 560 DSLOGREL(("DSound: Query IDirectSoundBuffer8%Rhrc\n", hr));560 DSLOGREL(("DSound: Querying playback sound buffer interface failed with %Rhrc\n", hr)); 561 561 break; 562 562 } … … 568 568 if (FAILED(hr)) 569 569 { 570 DSLOGREL(("DSound: Playback GetFormat%Rhrc\n", hr));570 DSLOGREL(("DSound: Getting playback format failed with %Rhrc\n", hr)); 571 571 break; 572 572 } … … 578 578 if (FAILED(hr)) 579 579 { 580 DSLOGREL(("DSound: Playback GetCaps%Rhrc\n", hr));580 DSLOGREL(("DSound: Getting playback capabilities failed with %Rhrc\n", hr)); 581 581 break; 582 582 } … … 601 601 602 602 if (bc.dwBufferBytes & pDSoundStrmOut->strmOut.Props.uAlign) 603 DSLOGREL(("DSound: Playback GetCaps returned misaligned buffer: size %RU32, alignment %RU32\n",603 DSLOGREL(("DSound: Playback capabilities returned misaligned buffer: size %RU32, alignment %RU32\n", 604 604 bc.dwBufferBytes, pDSoundStrmOut->strmOut.Props.uAlign + 1)); 605 605 … … 626 626 { 627 627 hr = HRESULT_FROM_WIN32(GetLastError()); 628 DSLOGREL(("DSound: CreateEvent for output failed with hr=%Rhrc\n", hr));628 DSLOGREL(("DSound: CreateEvent for output failed with %Rhrc\n", hr)); 629 629 break; 630 630 } … … 641 641 hr = IDirectSoundNotify_SetNotificationPositions(pNotify, 1 /* Count */, &dsBufPosNotify); 642 642 if (FAILED(hr)) 643 DSLOGREL(("DSound: IDirectSoundNotify_SetNotificationPositions failed with hr=%Rhrc\n", hr));643 DSLOGREL(("DSound: Setting playback position notification failed with %Rhrc\n", hr)); 644 644 645 645 IDirectSoundNotify_Release(pNotify); 646 646 } 647 647 else 648 DSLOGREL(("DSound: IDirectSoundNotify_QueryInterface failed with hr=%Rhrc\n", hr));648 DSLOGREL(("DSound: Querying interface for position notification failed with %Rhrc\n", hr)); 649 649 650 650 if (FAILED(hr)) … … 727 727 } 728 728 else 729 DSLOGREL(("DSound: Playback GetStatus%Rhrc\n", hr));729 DSLOGREL(("DSound: Retrieving playback status failed with %Rhrc\n", hr)); 730 730 731 731 return hr; … … 751 751 dsoundPlayClearSamples(pDSoundStrmOut); 752 752 else 753 DSLOGREL(("DSound: Stop playback%Rhrc\n", hr));753 DSLOGREL(("DSound: Stopping playback failed with %Rhrc\n", hr)); 754 754 } 755 755 else … … 870 870 if (FAILED(hr)) 871 871 { 872 DSLOGREL(("DSound: DirectSoundCapture create%Rhrc\n", hr));872 DSLOGREL(("DSound: Creating capture instance failed with %Rhrc\n", hr)); 873 873 } 874 874 else … … 879 879 { 880 880 if (hr == DSERR_NODRIVER) /* Usually means that no capture devices are attached. */ 881 DSLOGREL(("DSound: DirectSound capture is currentlyunavailable\n"));881 DSLOGREL(("DSound: Capture device currently is unavailable\n")); 882 882 else 883 DSLOGREL(("DSound: DirectSoundCapture initialize%Rhrc\n", hr));883 DSLOGREL(("DSound: Initializing capturing device failed with %Rhrc\n", hr)); 884 884 885 885 directSoundCaptureInterfaceRelease(pDSoundStrmIn); … … 908 908 } 909 909 else 910 DSLOGREL(("DSound: Stop capture buffer%Rhrc\n", hr));910 DSLOGREL(("DSound: Stopping capture buffer failed with %Rhrc\n", hr)); 911 911 } 912 912 … … 959 959 if (FAILED(hr)) 960 960 { 961 DSLOGREL(("DSound: CreateCaptureBuffer %Rhrc\n", hr)); 961 if (hr == E_ACCESSDENIED) 962 { 963 DSLOGREL(("DSound: Capturing input from host not possible, access denied\n")); 964 } 965 else 966 DSLOGREL(("DSound: Creating capture buffer failed with %Rhrc\n", hr)); 962 967 break; 963 968 } … … 967 972 if (FAILED(hr)) 968 973 { 969 DSLOGREL(("DSound: Query IDirectSoundCaptureBuffer8%Rhrc\n", hr));974 DSLOGREL(("DSound: Querying interface for capture buffer failed with %Rhrc\n", hr)); 970 975 break; 971 976 } … … 979 984 { 980 985 cbReadPos = 0; 981 DSLOGREL(("DSound: Capture (open) GetCurrentPosition%Rhrc\n", hr));986 DSLOGREL(("DSound: Getting capture position failed with %Rhrc\n", hr)); 982 987 } 983 988 … … 986 991 if (FAILED(hr)) 987 992 { 988 DSLOGREL(("DSound: Capture GetFormat%Rhrc\n", hr));993 DSLOGREL(("DSound: Getting capture format failed with %Rhrc\n", hr)); 989 994 break; 990 995 } … … 996 1001 if (FAILED(hr)) 997 1002 { 998 DSLOGREL((" DSound: Capture GetCaps%Rhrc\n", hr));1003 DSLOGREL(("Getting capture capabilities failed with %Rhrc\n", hr)); 999 1004 break; 1000 1005 } … … 1055 1060 hr = IDirectSoundCaptureBuffer_Stop(pDSoundStrmIn->pDSCB); 1056 1061 if (FAILED(hr)) 1057 DSLOGREL(("DSound: Capture buffer stop%Rhrc\n", hr));1062 DSLOGREL(("DSound: Stopping capture buffer failed with %Rhrc\n", hr)); 1058 1063 } 1059 1064 else … … 1076 1081 if (FAILED(hr)) 1077 1082 { 1078 DSLOGREL(("DSound: Capture start GetStatus%Rhrc\n", hr));1083 DSLOGREL(("DSound: Retrieving capture status failed with %Rhrc\n", hr)); 1079 1084 } 1080 1085 else … … 1090 1095 fFlags |= DSCBSTART_LOOPING; 1091 1096 #endif 1092 DSLOG(("DSound: Capture start\n"));1097 DSLOG(("DSound: Starting to capture\n")); 1093 1098 hr = IDirectSoundCaptureBuffer8_Start(pDSoundStrmIn->pDSCB, fFlags); 1094 1099 if (FAILED(hr)) 1095 DSLOGREL(("DSound: Capture started%Rhrc\n", hr));1100 DSLOGREL(("DSound: Starting to capture failed with %Rhrc\n", hr)); 1096 1101 } 1097 1102 } … … 1421 1426 if (FAILED(hr)) 1422 1427 { 1423 DSLOGREL(("DSound: Playback: Unable to start playing, hr=%Rhrc\n", hr));1428 DSLOGREL(("DSound: Starting playback failed with %Rhrc\n", hr)); 1424 1429 rc = VERR_NOT_SUPPORTED; 1425 1430 break; … … 1582 1587 if (hr != pDSoundStrmIn->hrLastCaptureIn) 1583 1588 { 1584 DSLOGREL(("DSound: Capture GetCurrentPosition%Rhrc\n", hr));1589 DSLOGREL(("DSound: Getting capture position failed with %Rhrc\n", hr)); 1585 1590 pDSoundStrmIn->hrLastCaptureIn = hr; 1586 1591 } … … 1949 1954 else 1950 1955 { 1951 DSLOGREL(("DSound: DirectSound not available %Rhrc\n", hr));1956 DSLOGREL(("DSound: DirectSound not available: %Rhrc\n", hr)); 1952 1957 rc = VERR_NOT_SUPPORTED; 1953 1958 } … … 2034 2039 if (FAILED(hr)) 2035 2040 { 2036 DSLOGREL(("DSound: CoInitializeEx %Rhrc\n", hr));2041 DSLOGREL(("DSound: CoInitializeEx failed with %Rhrc\n", hr)); 2037 2042 return VERR_NOT_SUPPORTED; 2038 2043 }
Note:
See TracChangeset
for help on using the changeset viewer.