mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
23 lines
No EOL
480 B
Rust
23 lines
No EOL
480 B
Rust
use self::softmixer::SoftMixer;
|
|
|
|
pub mod softmixer;
|
|
|
|
pub trait Mixer {
|
|
fn start(&self);
|
|
fn stop(&self);
|
|
fn set_volume(&self, volume: u16);
|
|
fn volume(&self) -> u16;
|
|
fn get_audio_filter(&self) -> Option<Box<AudioFilter + Send>> {
|
|
None
|
|
}
|
|
}
|
|
|
|
pub trait AudioFilter {
|
|
fn modify_stream(&self, data: &mut [i16]);
|
|
}
|
|
|
|
pub fn find<T: AsRef<str>>(name: Option<T>) -> Option<Box<Mixer + Send>> {
|
|
match name {
|
|
_ => Some(Box::new(SoftMixer::new())),
|
|
}
|
|
} |