1
0
Эх сурвалжийг харах

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.
Norihiro Kamae 3 жил өмнө
parent
commit
7b8793f6c3
1 өөрчлөгдсөн 6 нэмэгдсэн , 0 устгасан
  1. 6 0
      libobs/obs-source.c

+ 6 - 0
libobs/obs-source.c

@@ -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);
 		}
 	}