@@ -135,11 +135,6 @@ use crate::{decoder::builder::Settings, BitDepth};
135135/// - **Reset required**: Recreate decoder and continue with next track
136136/// - **I/O errors**: Attempt to continue when possible
137137/// - **Terminal errors**: Clean shutdown when recovery is impossible
138- ///
139- /// # Thread Safety
140- ///
141- /// This decoder is not thread-safe. Create separate instances for concurrent access
142- /// or use appropriate synchronization primitives.
143138pub struct SymphoniaDecoder {
144139 /// The underlying Symphonia audio decoder.
145140 ///
@@ -1054,12 +1049,6 @@ impl Iterator for SymphoniaDecoder {
10541049 ///
10551050 /// For multi-track files, estimates represent the currently selected audio
10561051 /// track, not the entire file duration or all tracks combined.
1057- ///
1058- /// # Returns
1059- ///
1060- /// A tuple `(lower_bound, upper_bound)` where:
1061- /// - `lower_bound`: Minimum number of samples guaranteed to be available
1062- /// - `upper_bound`: Maximum number of samples that might be available (None if unknown)
10631052 fn size_hint ( & self ) -> ( usize , Option < usize > ) {
10641053 // Samples already decoded and buffered (guaranteed available)
10651054 let buffered_samples = self
@@ -1189,36 +1178,34 @@ fn should_continue_on_decode_error(
11891178 }
11901179}
11911180
1181+ /// Converts Rodio's SeekMode to Symphonia's SeekMode.
1182+ ///
1183+ /// This conversion maps Rodio's seeking preferences to Symphonia's
1184+ /// internal seeking modes, enabling consistent seeking behavior
1185+ /// across different audio processing layers.
1186+ ///
1187+ /// # Mapping
1188+ ///
1189+ /// - `SeekMode::Fastest` → `SymphoniaSeekMode::Coarse`
1190+ /// - Prioritizes speed over precision
1191+ /// - Uses keyframe-based seeking when available
1192+ /// - Suitable for user scrubbing and fast navigation
1193+ /// - `SeekMode::Nearest` → `SymphoniaSeekMode::Accurate`
1194+ /// - Prioritizes precision over speed
1195+ /// - Attempts sample-accurate positioning
1196+ /// - Suitable for gapless playback and precise positioning
1197+ ///
1198+ /// # Performance Implications
1199+ ///
1200+ /// The choice between modes affects performance significantly:
1201+ /// - **Coarse**: Fast seeks but may require fine-tuning
1202+ /// - **Accurate**: Slower seeks but precise positioning
1203+ ///
1204+ /// # Format Compatibility
1205+ ///
1206+ /// Not all formats support both modes equally. Automatic
1207+ /// fallbacks may occur when preferred mode unavailable.
11921208impl From < SeekMode > for SymphoniaSeekMode {
1193- /// Converts Rodio's SeekMode to Symphonia's SeekMode.
1194- ///
1195- /// This conversion maps Rodio's seeking preferences to Symphonia's
1196- /// internal seeking modes, enabling consistent seeking behavior
1197- /// across different audio processing layers.
1198- ///
1199- /// # Mapping
1200- ///
1201- /// - `SeekMode::Fastest` → `SymphoniaSeekMode::Coarse`
1202- /// - Prioritizes speed over precision
1203- /// - Uses keyframe-based seeking when available
1204- /// - Suitable for user scrubbing and fast navigation
1205- /// - `SeekMode::Nearest` → `SymphoniaSeekMode::Accurate`
1206- /// - Prioritizes precision over speed
1207- /// - Attempts sample-accurate positioning
1208- /// - Suitable for gapless playback and precise positioning
1209- ///
1210- /// # Performance Implications
1211- ///
1212- /// The choice between modes affects performance significantly:
1213- /// - **Coarse**: Fast seeks but may require fine-tuning
1214- /// - **Accurate**: Slower seeks but precise positioning
1215- ///
1216- /// # Format Compatibility
1217- ///
1218- /// Not all formats support both modes equally:
1219- /// - Some formats only implement one mode effectively
1220- /// - Automatic fallbacks may occur when preferred mode unavailable
1221- /// - Mode availability may depend on stream characteristics
12221209 fn from ( mode : SeekMode ) -> Self {
12231210 match mode {
12241211 SeekMode :: Fastest => SymphoniaSeekMode :: Coarse ,
0 commit comments