scanAudio
Decodes one audio track of media without an output device, all of it or one range of it.
Opens its own session through backend, so it never touches the reader of a playing session. The decoder comes from the same factory list, in the same order, as playback, and every buffer is interleaved the way the playback feed does. The sink therefore receives the samples and timestamps an AudioTap would, before any seek trim. track names the audio track; null picks the container's default ordinary track, else the first ordinary one.
A range seeks first, so it needs a seekable item. A container that seeks by estimate lands at or before the asked-for time, and the blocks carry the timestamps they really have, so a caller that needs an exact boundary reads it from them rather than assuming the seek was exact.
An item with a MediaItem.clip is scanned over its clip only, as if the range were cut to it, and a source that cannot seek reaches the clip's start by decoding forward. The range and every timestamp stay in the file's own timeline, not the item's.
Reads block in the caller's context, so call this from one that may block. Cancel the calling coroutine to stop: the decoder and the session are closed before this returns or throws.
Throws
when no decoder accepts the track.