-
Notifications
You must be signed in to change notification settings - Fork 293
Open
Description
The question was brought up by this ggez issue: ggez/ggez#477 Edit for clarification: Basically, we just want to be able to find the duration of the decoded stream without having to actually decode the whole thing.
It does indeed appear to be correct that only the WAV decoder implements this method. rodio's stream-based API does seem like it might be problematic, but the method only exists when the stream is Seek, so I think we can manage it.
Looking at the various upstream crates, does the functionality exist to do this without having to decode the entire stream in the process?
lewton: https://docs.rs/lewton/0.9.1/lewton/audio/fn.get_decoded_sample_count.htmlminimp3: Doesn't look like it, though I am pretty darn sure that the C library provides the capability to do this. Just need to write a function that skims through the blocks in the stream reading the metadata without bothering to decode the individual blocks.claxon: I think this has the relevant info, but it doesn't seem reliable (thesamplesfield is anOption) and I'm not sure if there's a nicer way to get to it
Metadata
Metadata
Assignees
Labels
No labels