VirtualBox

Changeset 88429 in vbox


Ignore:
Timestamp:
Apr 9, 2021 11:12:13 AM (4 years ago)
Author:
vboxsync
Message:

DrvHostAudioAlsa: Some logging changes. A couple of @todos. bugref:9890

File:
1 edited

Legend:

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

    r88390 r88429  
    9191    /** Size (in bytes) of allocated scratch buffer. */
    9292    size_t              cbBuf;
     93    /** Internal stream offset (for debugging). */
     94    uint64_t            offInternal;
    9395} ALSAAUDIOSTREAM, *PALSAAUDIOSTREAM;
    9496
     
    723725    AssertReturn(cbBuf, VERR_INVALID_PARAMETER);
    724726    AssertPtrReturn(pcbWritten, VERR_INVALID_POINTER);
    725     Log4Func(("pvBuf=%p uBufSize=%#x (%u) state=%s - %s\n", pvBuf, cbBuf, cbBuf,
     727    Log4Func(("@%#RX64: pvBuf=%p cbBuf=%#x (%u) state=%s - %s\n", pStreamALSA->offInternal, pvBuf, cbBuf, cbBuf,
    726728              snd_pcm_state_name(snd_pcm_state(pStreamALSA->phPCM)), pStreamALSA->pCfg->szName));
    727729
     
    761763                              cbToWrite, cFramesWritten, cFramesAvail));
    762764                    *pcbWritten = PDMAudioPropsFramesToBytes(pProps, cFramesWritten);
     765                    pStreamALSA->offInternal += *pcbWritten;
    763766                    return VINF_SUCCESS;
    764767                }
     
    800803                                  cbToWrite, cFramesWritten, cFramesAvail));
    801804                        *pcbWritten = PDMAudioPropsFramesToBytes(pProps, cFramesWritten);
     805                        pStreamALSA->offInternal += *pcbWritten;
    802806                        return VINF_SUCCESS;
    803807                    }
     
    10991103        case PDMAUDIOSTREAMCMD_PAUSE:
    11001104        {
     1105            /** @todo shouldn't this try snd_pcm_pause first? */
    11011106            err = snd_pcm_drop(pStreamALSA->phPCM);
    11021107            if (err < 0)
     
    11161121                || streamState == SND_PCM_STATE_RUNNING)
    11171122            {
     1123                /** @todo r=bird: You want EMT to block here for potentially 200-300ms worth
     1124                 *        of buffer to be drained?  That's a certifiably bad idea.  */
    11181125                err = snd_pcm_nonblock(pStreamALSA->phPCM, 0);
    11191126                if (err < 0)
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