From c2c85e23323b8754ee0cf5c7c01705d5437a73ac Mon Sep 17 00:00:00 2001 From: dvdsk Date: Fri, 13 Oct 2023 15:21:18 +0200 Subject: [PATCH] improve seek beyond end documentation --- src/sink.rs | 6 ++++-- src/source/mod.rs | 6 ++++-- src/spatial_sink.rs | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/sink.rs b/src/sink.rs index c9734cb..fcbf2cf 100644 --- a/src/sink.rs +++ b/src/sink.rs @@ -209,8 +209,10 @@ impl Sink { /// when you try to seek beyond the length of the source this function will seek /// to the end of the source instead. /// - /// If the duration of the source is known and the seek position lies beyond - /// it the saturates, that is the position is then at the end of the source. + /// As long as the duration of the source is known seek is guarenteed to saturate + /// at the end of the source. For example given a source that reports a total duration + /// of 42 seconds calling `try_seek()` with 60 seconds as argument will seek to + /// 42 seconds. /// /// # Errors /// This function will return [`SeekError::NotSupported`] if one of the underlying diff --git a/src/source/mod.rs b/src/source/mod.rs index 9890da6..4a6346b 100644 --- a/src/source/mod.rs +++ b/src/source/mod.rs @@ -363,8 +363,10 @@ where /// when you seek beyond the sources length this function will seek to the /// end of the source instead. /// - /// If the duration of the source is known and the seek position lies beyond - /// it the saturates, that is the position is then at the end of the source. + /// As long as the duration of the source is known seek is guarenteed to saturate + /// at the end of the source. For example given a source that reports a total duration + /// of 42 seconds calling `try_seek()` with 60 seconds as argument will seek to + /// 42 seconds. /// /// # Errors /// This function will return [`SeekError::NotSupported`] if one of the underlying diff --git a/src/spatial_sink.rs b/src/spatial_sink.rs index f1e7026..7795a0f 100644 --- a/src/spatial_sink.rs +++ b/src/spatial_sink.rs @@ -173,8 +173,10 @@ impl SpatialSink { /// when you try to seek beyong the length of the source this function will seek /// to the end of the source instead. /// - /// If the duration of the source is known and the seek position lies beyond - /// it the saturates, that is the position is then at the end of the source. + /// As long as the duration of the source is known seek is guarenteed to saturate + /// at the end of the source. For example given a source that reports a total duration + /// of 42 seconds calling `try_seek()` with 60 seconds as argument will seek to + /// 42 seconds. /// /// # Errors /// This function will return [`SeekError::NotSupported`] if one of the underlying