From b081b5850e1b033b8841008093e2ab3babc152df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Fri, 5 Mar 2021 23:17:56 +0100 Subject: FloatSample --- mumd/src/audio.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mumd') diff --git a/mumd/src/audio.rs b/mumd/src/audio.rs index 9dbb61e..299a4e6 100644 --- a/mumd/src/audio.rs +++ b/mumd/src/audio.rs @@ -395,11 +395,13 @@ fn get_default_sfx() -> Cow<'static, [u8]> { Cow::from(include_bytes!("fallback_sfx.wav").as_ref()) } +type FloatSample = <::Sample as Sample>::Float; + struct StreamingNoiseGate { open: usize, signal: S, deactivation_delay: usize, - alltime_high: <::Sample as Sample>::Float, + alltime_high: FloatSample, } impl StreamingNoiseGate { @@ -411,7 +413,7 @@ impl StreamingNoiseGate { open: 0, signal, deactivation_delay, - alltime_high: <<::Sample as Sample>::Float as Sample>::EQUILIBRIUM, + alltime_high: FloatSample::::EQUILIBRIUM, } } } @@ -419,7 +421,7 @@ impl StreamingNoiseGate { impl StreamingSignal for StreamingNoiseGate where S: StreamingSignal + Unpin, - <<::Frame as Frame>::Sample as Sample>::Float: Unpin, + FloatSample: Unpin, ::Frame: Unpin { type Frame = S::Frame; -- cgit v1.2.1