//! Audio-track switch strategy decision logic. //! //! Pure logic, extracted from the command layer so it can be unit-tested in the //! player core — the sibling of [`super::seek`]. `player_switch_audio_track` //! turns the resulting [`AudioTrackSwitchStrategy`] into a concrete action. //! //! The rule this module exists to state: **an engine can only select a track //! the stream in front of it actually carries.** A Jellyfin transcode is built //! around one `AudioStreamIndex`, so the alternate tracks are not in the stream //! at all — the switch has to re-open it. Only a direct play/stream hands the //! engine the source file with every track present. /// How a request to change audio track has to be carried out. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum AudioTrackSwitchStrategy { /// Re-open the stream pinned to the chosen track; the frontend reloads its /// `