@@ -78,6 +78,9 @@ def __init__(
7878 def get_all_samples (self ) -> AudioSamples :
7979 """Returns all the audio samples from the source.
8080
81+ To decode samples in a specific range, use
82+ :meth:`~torchcodec.decoders.AudioDecoder.get_samples_played_in_range`.
83+
8184 Returns:
8285 AudioSamples: The samples within the file.
8386 """
@@ -90,11 +93,18 @@ def get_samples_played_in_range(
9093
9194 Samples are in the half open range [start_seconds, stop_seconds).
9295
96+ To decode all the samples from beginning to end, you can call this
97+ method while leaving ``start_seconds`` and ``stop_seconds`` to their
98+ default values, or use
99+ :meth:`~torchcodec.decoders.AudioDecoder.get_all_samples` as a more
100+ convenient alias.
101+
93102 Args:
94103 start_seconds (float): Time, in seconds, of the start of the
95104 range. Default: 0.
96- stop_seconds (float): Time, in seconds, of the end of the
97- range. As a half open range, the end is excluded.
105+ stop_seconds (float or None): Time, in seconds, of the end of the
106+ range. As a half open range, the end is excluded. Default: None,
107+ which decodes samples until the end.
98108
99109 Returns:
100110 AudioSamples: The samples within the specified range.
0 commit comments