VirtualBox

Changeset 59263 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Jan 6, 2016 2:12:49 PM (9 years ago)
Author:
vboxsync
Message:

DrvHostDSound.cpp: Logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp

    r59103 r59263  
    248248    {
    249249        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));
    251251        LogFlowFunc(("Failed with %Rhrc\n", hr));
    252252        return VERR_NOT_AVAILABLE;
     
    304304    HRESULT hr = IDirectSoundBuffer8_Restore(pDSB);
    305305    if (FAILED(hr))
    306         DSLOGREL(("DSound: Restore playback buffer %Rhrc\n", hr));
     306        DSLOGREL(("DSound: Restoring playback buffer failed with %Rhrc\n", hr));
    307307    return hr;
    308308}
     
    314314    HRESULT hr = IDirectSoundBuffer8_Unlock(pDSB, pv1, cb1, pv2, cb2);
    315315    if (FAILED(hr))
    316         DSLOGREL(("DSound: Unlock playback buffer %Rhrc\n", hr));
     316        DSLOGREL(("DSound: Unlocking playback buffer failed with %Rhrc\n", hr));
    317317    return hr;
    318318}
     
    324324    HRESULT hr = IDirectSoundCaptureBuffer8_Unlock(pDSCB, pv1, cb1, pv2, cb2);
    325325    if (FAILED(hr))
    326         DSLOGREL(("DSound: Unlock capture buffer %Rhrc\n", hr));
     326        DSLOGREL(("DSound: Unlocking capture buffer failed with %Rhrc\n", hr));
    327327    return hr;
    328328}
     
    351351    if (FAILED(hr))
    352352    {
    353         DSLOGREL(("DSound: Lock playback buffer %Rhrc\n", hr));
     353        DSLOGREL(("DSound: Locking playback buffer failed with %Rhrc\n", hr));
    354354        return hr;
    355355    }
     
    387387    if (FAILED(hr))
    388388    {
    389         DSLOGREL(("DSound: Lock capture buffer %Rhrc\n", hr));
     389        DSLOGREL(("DSound: Locking capture buffer failed with %Rhrc\n", hr));
    390390        return hr;
    391391    }
     
    434434    if (FAILED(hr))
    435435    {
    436         DSLOGREL(("DSound: Create DirectSound instance %Rhrc\n", hr));
     436        DSLOGREL(("DSound: Creating playback instance failed with %Rhrc\n", hr));
    437437    }
    438438    else
     
    444444            hr = IDirectSound8_SetCooperativeLevel(pDSoundStrmOut->pDS, hWnd, DSSCL_PRIORITY);
    445445            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));
    447447        }
    448448
     
    452452                DSLOGREL(("DSound: DirectSound playback is currently unavailable\n"));
    453453            else
    454                 DSLOGREL(("DSound: DirectSound playback initialize %Rhrc\n", hr));
     454                DSLOGREL(("DSound: DirectSound playback initialization failed with %Rhrc\n", hr));
    455455
    456456            directSoundPlayInterfaceRelease(pDSoundStrmOut);
     
    519519    {
    520520        /* Should not happen but be forgiving. */
    521         DSLOGREL(("DSound: DirectSoundBuffer already exists\n"));
     521        DSLOGREL(("DSound: Playback buffer already exists\n"));
    522522        directSoundPlayClose(pThis, pDSoundStrmOut);
    523523    }
     
    549549        if (FAILED(hr))
    550550        {
    551             DSLOGREL(("DSound: CreateSoundBuffer %Rhrc\n", hr));
     551            DSLOGREL(("DSound: Creating playback sound buffer failed with %Rhrc\n", hr));
    552552            break;
    553553        }
     
    558558        if (FAILED(hr))
    559559        {
    560             DSLOGREL(("DSound: Query IDirectSoundBuffer8 %Rhrc\n", hr));
     560            DSLOGREL(("DSound: Querying playback sound buffer interface failed with %Rhrc\n", hr));
    561561            break;
    562562        }
     
    568568        if (FAILED(hr))
    569569        {
    570             DSLOGREL(("DSound: Playback GetFormat %Rhrc\n", hr));
     570            DSLOGREL(("DSound: Getting playback format failed with %Rhrc\n", hr));
    571571            break;
    572572        }
     
    578578        if (FAILED(hr))
    579579        {
    580             DSLOGREL(("DSound: Playback GetCaps %Rhrc\n", hr));
     580            DSLOGREL(("DSound: Getting playback capabilities failed with %Rhrc\n", hr));
    581581            break;
    582582        }
     
    601601
    602602        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",
    604604                      bc.dwBufferBytes, pDSoundStrmOut->strmOut.Props.uAlign + 1));
    605605
     
    626626        {
    627627            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));
    629629            break;
    630630        }
     
    641641            hr = IDirectSoundNotify_SetNotificationPositions(pNotify, 1 /* Count */, &dsBufPosNotify);
    642642            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));
    644644
    645645            IDirectSoundNotify_Release(pNotify);
    646646        }
    647647        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));
    649649
    650650        if (FAILED(hr))
     
    727727    }
    728728    else
    729         DSLOGREL(("DSound: Playback GetStatus %Rhrc\n", hr));
     729        DSLOGREL(("DSound: Retrieving playback status failed with %Rhrc\n", hr));
    730730
    731731    return hr;
     
    751751            dsoundPlayClearSamples(pDSoundStrmOut);
    752752        else
    753             DSLOGREL(("DSound: Stop playback %Rhrc\n", hr));
     753            DSLOGREL(("DSound: Stopping playback failed with %Rhrc\n", hr));
    754754    }
    755755    else
     
    870870    if (FAILED(hr))
    871871    {
    872         DSLOGREL(("DSound: DirectSoundCapture create %Rhrc\n", hr));
     872        DSLOGREL(("DSound: Creating capture instance failed with %Rhrc\n", hr));
    873873    }
    874874    else
     
    879879        {
    880880            if (hr == DSERR_NODRIVER) /* Usually means that no capture devices are attached. */
    881                 DSLOGREL(("DSound: DirectSound capture is currently unavailable\n"));
     881                DSLOGREL(("DSound: Capture device currently is unavailable\n"));
    882882            else
    883                 DSLOGREL(("DSound: DirectSoundCapture initialize %Rhrc\n", hr));
     883                DSLOGREL(("DSound: Initializing capturing device failed with %Rhrc\n", hr));
    884884
    885885            directSoundCaptureInterfaceRelease(pDSoundStrmIn);
     
    908908        }
    909909        else
    910             DSLOGREL(("DSound: Stop capture buffer %Rhrc\n", hr));
     910            DSLOGREL(("DSound: Stopping capture buffer failed with %Rhrc\n", hr));
    911911    }
    912912
     
    959959        if (FAILED(hr))
    960960        {
    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));
    962967            break;
    963968        }
     
    967972        if (FAILED(hr))
    968973        {
    969             DSLOGREL(("DSound: Query IDirectSoundCaptureBuffer8 %Rhrc\n", hr));
     974            DSLOGREL(("DSound: Querying interface for capture buffer failed with %Rhrc\n", hr));
    970975            break;
    971976        }
     
    979984        {
    980985            cbReadPos = 0;
    981             DSLOGREL(("DSound: Capture (open) GetCurrentPosition %Rhrc\n", hr));
     986            DSLOGREL(("DSound: Getting capture position failed with %Rhrc\n", hr));
    982987        }
    983988
     
    986991        if (FAILED(hr))
    987992        {
    988             DSLOGREL(("DSound: Capture GetFormat %Rhrc\n", hr));
     993            DSLOGREL(("DSound: Getting capture format failed with %Rhrc\n", hr));
    989994            break;
    990995        }
     
    9961001        if (FAILED(hr))
    9971002        {
    998             DSLOGREL(("DSound: Capture GetCaps %Rhrc\n", hr));
     1003            DSLOGREL(("Getting capture capabilities failed with %Rhrc\n", hr));
    9991004            break;
    10001005        }
     
    10551060        hr = IDirectSoundCaptureBuffer_Stop(pDSoundStrmIn->pDSCB);
    10561061        if (FAILED(hr))
    1057             DSLOGREL(("DSound: Capture buffer stop %Rhrc\n", hr));
     1062            DSLOGREL(("DSound: Stopping capture buffer failed with %Rhrc\n", hr));
    10581063    }
    10591064    else
     
    10761081        if (FAILED(hr))
    10771082        {
    1078             DSLOGREL(("DSound: Capture start GetStatus %Rhrc\n", hr));
     1083            DSLOGREL(("DSound: Retrieving capture status failed with %Rhrc\n", hr));
    10791084        }
    10801085        else
     
    10901095                fFlags |= DSCBSTART_LOOPING;
    10911096#endif
    1092                 DSLOG(("DSound: Capture start\n"));
     1097                DSLOG(("DSound: Starting to capture\n"));
    10931098                hr = IDirectSoundCaptureBuffer8_Start(pDSoundStrmIn->pDSCB, fFlags);
    10941099                if (FAILED(hr))
    1095                     DSLOGREL(("DSound: Capture started %Rhrc\n", hr));
     1100                    DSLOGREL(("DSound: Starting to capture failed with %Rhrc\n", hr));
    10961101            }
    10971102        }
     
    14211426            if (FAILED(hr))
    14221427            {
    1423                 DSLOGREL(("DSound: Playback: Unable to start playing, hr=%Rhrc\n", hr));
     1428                DSLOGREL(("DSound: Starting playback failed with %Rhrc\n", hr));
    14241429                rc = VERR_NOT_SUPPORTED;
    14251430                break;
     
    15821587            if (hr != pDSoundStrmIn->hrLastCaptureIn)
    15831588            {
    1584                 DSLOGREL(("DSound: Capture GetCurrentPosition %Rhrc\n", hr));
     1589                DSLOGREL(("DSound: Getting capture position failed with %Rhrc\n", hr));
    15851590                pDSoundStrmIn->hrLastCaptureIn = hr;
    15861591            }
     
    19491954    else
    19501955    {
    1951         DSLOGREL(("DSound: DirectSound not available %Rhrc\n", hr));
     1956        DSLOGREL(("DSound: DirectSound not available: %Rhrc\n", hr));
    19521957        rc = VERR_NOT_SUPPORTED;
    19531958    }
     
    20342039    if (FAILED(hr))
    20352040    {
    2036         DSLOGREL(("DSound: CoInitializeEx %Rhrc\n", hr));
     2041        DSLOGREL(("DSound: CoInitializeEx failed with %Rhrc\n", hr));
    20372042        return VERR_NOT_SUPPORTED;
    20382043    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette