Closed Roms1383 closed 2 months ago
Commit b728f9c refactors the logic onto Region
to turn it into samples.
The method is not publicly exposed, to avoid confusion with slice
representation, both being (usize, usize)
.
Commit 140c1e6 is purely to avoid having to .slice(None)
the StreamingSoundData<T>
(which requires self
rightfully) to get the underlying decoder.num_frames()
.
It's particularly useful to get the total duration of a streaming sound data without having to load it twice (because each method consumes it).
I don't understand the purpose of most of these changes. What use case do these changes help with?
This PR does not address #102, but at least it exposes methods required to allow downstream users to calculate duration, including for
Region
, on their own.