From 96ac028918baa1094374e823a2464016f7f20479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Sat, 26 Dec 2020 22:33:10 +0100 Subject: add todos --- mumd/src/audio.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'mumd/src/audio.rs') diff --git a/mumd/src/audio.rs b/mumd/src/audio.rs index 6b46a7a..1e231e2 100644 --- a/mumd/src/audio.rs +++ b/mumd/src/audio.rs @@ -102,7 +102,7 @@ impl Audio { None } }) - .unwrap() + .unwrap() //TODO handle panic .with_sample_rate(sample_rate); let output_supported_sample_format = output_supported_config.sample_format(); let output_config: StreamConfig = output_supported_config.into(); @@ -120,7 +120,7 @@ impl Audio { None } }) - .unwrap() + .unwrap() //TODO handle panic .with_sample_rate(sample_rate); let input_supported_sample_format = input_supported_config.sample_format(); let input_config: StreamConfig = input_supported_config.into(); @@ -164,7 +164,7 @@ impl Audio { err_fn, ), } - .unwrap(); + .unwrap(); //TODO handle panic let (sample_sender, sample_receiver) = futures_channel::mpsc::channel(1_000_000); @@ -199,7 +199,7 @@ impl Audio { err_fn, ), } - .unwrap(); + .unwrap(); //TODO handle panic let opus_stream = OpusEncoder::new( 4, @@ -217,7 +217,7 @@ impl Audio { position_info: None, }); - output_stream.play().unwrap(); + output_stream.play().unwrap(); //TODO handle panic? let mut res = Self { output_config, @@ -268,7 +268,7 @@ impl Audio { let iter: Box> = match spec.channels { 1 => Box::new(samples.into_iter().flat_map(|e| vec![e, e])), 2 => Box::new(samples.into_iter()), - _ => unimplemented!() // TODO handle gracefully (this might not even happen) + _ => unimplemented!() // TODO handle panic (if speaker is surround speaker) }; let mut signal = signal::from_interleaved_samples_iter::<_, [f32; 2]>(iter); let interp = Linear::new(Signal::next(&mut signal), Signal::next(&mut signal)); @@ -401,4 +401,3 @@ fn get_sfx(file: &str) -> Cow<'static, [u8]> { fn get_default_sfx() -> Cow<'static, [u8]> { Cow::from(include_bytes!("fallback_sfx.wav").as_ref()) } - -- cgit v1.2.1