diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2017-10-07 04:41:45 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-10-07 05:01:04 +0300 |
commit | 20f1666bc92a165cee8e3c84f603ff6614f02969 (patch) | |
tree | 7ca531aae8d3d88ff3d82e6d28744d836f9e5ec7 /gst-plugin-audiofx/src/audioecho.rs | |
parent | 97ad0c0bc2bef5946afb49eab12e9f7c99dfe4d2 (diff) |
Run everything through rustfmt again
Diffstat (limited to 'gst-plugin-audiofx/src/audioecho.rs')
-rw-r--r-- | gst-plugin-audiofx/src/audioecho.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gst-plugin-audiofx/src/audioecho.rs b/gst-plugin-audiofx/src/audioecho.rs index 2063061b4..3bdeacb0c 100644 --- a/gst-plugin-audiofx/src/audioecho.rs +++ b/gst-plugin-audiofx/src/audioecho.rs @@ -158,9 +158,13 @@ impl AudioEcho { Box::new(imp) } - fn process<F: Float + ToPrimitive + FromPrimitive>(data: &mut [F], state: &mut State, settings: &Settings) { - let delay_frames = (settings.delay as usize) * (state.info.channels() as usize) * (state.info.rate() as usize) / - (gst::SECOND as usize); + fn process<F: Float + ToPrimitive + FromPrimitive>( + data: &mut [F], + state: &mut State, + settings: &Settings, + ) { + let delay_frames = (settings.delay as usize) * (state.info.channels() as usize) * + (state.info.rate() as usize) / (gst::SECOND as usize); for (i, (o, e)) in data.iter_mut().zip(state.buffer.iter(delay_frames)) { let inp = (*i).to_f64().unwrap(); @@ -228,7 +232,6 @@ impl ObjectImpl<RsBaseTransform> for AudioEcho { impl ElementImpl<RsBaseTransform> for AudioEcho {} impl BaseTransformImpl<RsBaseTransform> for AudioEcho { - fn transform_ip(&self, _element: &RsBaseTransform, buf: &gst::Buffer) -> gst::FlowReturn { let mut settings = *self.settings.lock().unwrap(); settings.delay = cmp::min(settings.max_delay, settings.delay); @@ -248,11 +251,11 @@ impl BaseTransformImpl<RsBaseTransform> for AudioEcho { gst_audio::AUDIO_FORMAT_F64 => { let mut data = map.as_mut_slice().as_mut_slice_of::<f64>().unwrap(); Self::process(data, state, &settings); - }, + } gst_audio::AUDIO_FORMAT_F32 => { let mut data = map.as_mut_slice().as_mut_slice_of::<f32>().unwrap(); Self::process(data, state, &settings); - }, + } _ => return gst::FlowReturn::NotNegotiated, } |