selene-core 0.4.2

selene-core is the backend for Selene, a local-first music player
Documentation
use serde::{Deserialize, Serialize};
use symphonia::core::audio::Layout;

#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
pub enum ChannelLayout {
    Mono,
    Stereo,
    TwoPointOne,
    FivePointOne,
}

impl From<Layout> for ChannelLayout {
    fn from(value: Layout) -> Self {
        match value {
            Layout::Mono => Self::Mono,
            Layout::Stereo => Self::Stereo,
            Layout::TwoPointOne => Self::TwoPointOne,
            Layout::FivePointOne => Self::FivePointOne,
        }
    }
}