#[cfg(all(target_arch = "wasm32", feature = "cpal-output"))]
compile_error!("wasm32 targets are incompatible with cpal-output. Use web-output instead");
#[cfg(feature = "cpal-output")]
pub mod cpal;
#[cfg(feature = "wav-output")]
pub mod wav;
#[cfg(feature = "web-output")]
pub mod web;
use super::source::Source;
#[cfg(feature = "cpal-output")]
pub type DefaultOutputDevice = cpal::CpalOutput;
#[cfg(all(feature = "web-output", not(feature = "cpal-output")))]
pub type DefaultOutputDevice = web::WebOutput;
pub trait OutputDevice: Send {
fn channel_count(&self) -> usize;
fn sample_rate(&self) -> u32;
fn sample_position(&self) -> u64;
fn volume(&self) -> f32;
fn set_volume(&mut self, volume: f32);
fn is_suspended(&self) -> bool;
fn is_running(&self) -> bool;
fn pause(&mut self);
fn resume(&mut self);
fn play(&mut self, source: Box<dyn Source>);
fn stop(&mut self);
fn close(&mut self);
}