VirtualBox

Changeset 76855 in vbox


Ignore:
Timestamp:
Jan 17, 2019 12:04:18 PM (6 years ago)
Author:
vboxsync
Message:

Audio/PulseAudio: (Release) Log current output latency in case of buffer underruns.

File:
1 edited

Legend:

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

    r76670 r76855  
    433433    }
    434434
    435 # ifdef LOG_ENABLED
    436435    pa_usec_t curLatencyUs = 0;
    437436    pa_stream_get_latency(pStream, &curLatencyUs, NULL /* Neg */);
    438437
     438    LogRel2(("PulseAudio: Latency now is %RU64ms\n", curLatencyUs / 1000 /* ms */));
     439
     440# ifdef LOG_ENABLED
    439441    const pa_timing_info *pTInfo = pa_stream_get_timing_info(pStream);
    440442    const pa_sample_spec *pSpec  = pa_stream_get_sample_spec(pStream);
    441443
    442444    pa_usec_t curPosWritesUs = pa_bytes_to_usec(pTInfo->write_index, pSpec);
     445    pa_usec_t curPosReadsUs  = pa_bytes_to_usec(pTInfo->read_index, pSpec);
    443446    pa_usec_t curTsUs        = pa_rtclock_now() - pStrm->tsStartUs;
    444447
    445     Log2Func(("curPosWrite=%RU64ms, curTs=%RU64ms, curDelta=%RI64ms, curLatency=%RU64ms\n",
    446               curPosWritesUs / 1000, curTsUs / 1000, (((int64_t)curPosWritesUs - (int64_t)curTsUs) / 1000), curLatencyUs / 1000));
     448    Log2Func(("curPosWrite=%RU64ms, curPosRead=%RU64ms, curTs=%RU64ms, curLatency=%RU64ms (%RU32Hz, %RU8 channels)\n",
     449              curPosWritesUs / RT_US_1MS_64, curPosReadsUs / RT_US_1MS_64,
     450              curTsUs / RT_US_1MS_64, curLatencyUs / RT_US_1MS_64, pSpec->rate, pSpec->channels));
    447451# endif
    448452}
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