1use ffi::*;
2use sys::SwrEngine::*;
3
4#[derive(Eq, PartialEq, Copy, Clone, Debug)]
5pub enum Engine {
6 Software,
7 SoundExchange,
8}
9
10impl From<SwrEngine> for Engine {
11 fn from(value: SwrEngine) -> Engine {
12 match value {
13 SWR_ENGINE_SWR => Engine::Software,
14 SWR_ENGINE_SOXR => Engine::SoundExchange,
15 SWR_ENGINE_NB => Engine::Software,
16 }
17 }
18}
19
20impl From<Engine> for SwrEngine {
21 fn from(value: Engine) -> SwrEngine {
22 match value {
23 Engine::Software => SWR_ENGINE_SWR,
24 Engine::SoundExchange => SWR_ENGINE_SOXR,
25 }
26 }
27}
28