VirtualBox

Ignore:
Timestamp:
Aug 3, 2016 2:16:14 PM (8 years ago)
Author:
vboxsync
Message:

Please use 'static const' on data that is constant, don't make the compiler recreated on the stack for each call.

File:
1 edited

Legend:

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

    r62580 r62919  
    167167
    168168    /* Consume as many samples as would be played at the current frequency since last call. */
    169     uint32_t cLive           = AudioMixBufLive(&pStream->MixBuf);
     169    /*uint32_t cLive           = AudioMixBufLive(&pStream->MixBuf);*/
    170170
    171171    uint64_t u64TicksNow     = PDMDrvHlpTMGetVirtualTime(pDrv->pDrvIns);
    172     uint64_t u64TicksElapsed = u64TicksNow  - pDbgStream->Out.tsLastPlayed;
    173     uint64_t u64TicksFreq    = PDMDrvHlpTMGetVirtualFreq(pDrv->pDrvIns);
     172   // uint64_t u64TicksElapsed = u64TicksNow  - pDbgStream->Out.tsLastPlayed;
     173   // uint64_t u64TicksFreq    = PDMDrvHlpTMGetVirtualFreq(pDrv->pDrvIns);
    174174
    175175    /*
     
    229229                                                        uint32_t *pcSamplesCaptured)
    230230{
     231    RT_NOREF(pInterface, pStream);
     232
    231233    /* Never capture anything. */
    232234    if (pcSamplesCaptured)
     
    238240static int debugDestroyStreamIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
    239241{
     242    RT_NOREF(pInterface, pStream);
    240243    LogFlowFuncLeaveRC(VINF_SUCCESS);
    241244    return VINF_SUCCESS;
     
    244247static int debugDestroyStreamOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOSTREAM pStream)
    245248{
    246     PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    247 
     249    RT_NOREF(pInterface);
    248250    PDEBUGAUDIOSTREAM pDbgStream = (PDEBUGAUDIOSTREAM)pStream;
    249251    if (   pDbgStream
     
    270272static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHostDebugAudioGetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
    271273{
     274    RT_NOREF(enmDir);
    272275    AssertPtrReturn(pInterface, PDMAUDIOBACKENDSTS_UNKNOWN);
    273276
     
    309312                                                        PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
    310313{
     314    RT_NOREF(enmStreamCmd);
    311315    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    312316    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
     
    359363static DECLCALLBACK(int) drvHostDebugAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    360364{
    361     AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER);
    362     /* pCfg is optional. */
    363 
     365    RT_NOREF(pCfg, fFlags);
     366    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    364367    PDRVHOSTDEBUGAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTDEBUGAUDIO);
    365368    LogRel(("Audio: Initializing DEBUG driver\n"));
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