libobs: Log audio timestamp exceeding TS_SMOOTHING_THRESHOLD

Timestamp of some of audio sources desync over the time and audio glitch
is suspected to be caused when the difference between `timestamp` and
`next_audio_ts_min` exceeds TS_SMOOTHING_THRESHOLD.
When such condition happens, leave a log message to investigate the
glitch of the audio.
This commit is contained in:
Norihiro Kamae 2022-04-18 18:48:21 +09:00 committed by Jim
parent 01565a0293
commit 7b8793f6c3

View File

@ -1479,6 +1479,12 @@ static void source_output_audio_data(obs_source_t *source,
if (source->async_unbuffered && source->async_decoupled)
source->timing_adjust = os_time - in.timestamp;
in.timestamp = source->next_audio_ts_min;
} else {
blog(LOG_DEBUG,
"Audio timestamp for '%s' exceeded TS_SMOOTHING_THRESHOLD, diff=%" PRIu64
" ns, expected %" PRIu64 ", input %" PRIu64,
source->context.name, diff,
source->next_audio_ts_min, in.timestamp);
}
}