diff --git a/src/LibVLCSharp/Shared/LibVLC.cs b/src/LibVLCSharp/Shared/LibVLC.cs index 3bfd7a66..893fb71b 100644 --- a/src/LibVLCSharp/Shared/LibVLC.cs +++ b/src/LibVLCSharp/Shared/LibVLC.cs @@ -776,6 +776,13 @@ static void GetLogContext(IntPtr logContext, out string? module, out string? fil /// </summary> public long Clock => Native.LibVLCClock(); + /// <summary> + /// Return the delay (in microseconds) until a certain timestamp. + /// </summary> + /// <param name="pts">timestamp in microsecond</param> + /// <returns>negative if timestamp is in the past, positive if it is in the future</returns> + public long Delay(long pts) => pts - Clock; + #region Exit static readonly InternalExitCallback ExitCallbackHandle = ExitCallback; diff --git a/src/LibVLCSharp/Shared/MediaPlayer.cs b/src/LibVLCSharp/Shared/MediaPlayer.cs index fa564255..c61bbd94 100644 --- a/src/LibVLCSharp/Shared/MediaPlayer.cs +++ b/src/LibVLCSharp/Shared/MediaPlayer.cs @@ -2039,7 +2039,7 @@ public delegate uint LibVLCVideoFormatCb(ref IntPtr opaque, IntPtr chroma, ref u /// <param name="data">data pointer as passed to libvlc_audio_set_callbacks() [IN]</param> /// <param name="samples">pointer to a table of audio samples to play back [IN]</param> /// <param name="count">number of audio samples to play back</param> - /// <param name="pts">expected play time stamp (see libvlc_delay())</param> + /// <param name="pts">expected play time stamp (see <see cref="LibVLC.Delay(long)"/>)</param> /// <remarks> /// <para>The LibVLC media player decodes and post-processes the audio signal</para> /// <para>asynchronously (in an internal thread). Whenever audio samples are ready</para>