From f35f52cbf94548e11b0ad059d3cb754af18c5ec8 Mon Sep 17 00:00:00 2001 From: Sasha Hilton Date: Fri, 2 Feb 2018 05:03:59 +0100 Subject: [PATCH] Remove redundant code --- src/audio_backend/jackaudio.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/audio_backend/jackaudio.rs b/src/audio_backend/jackaudio.rs index e1a67aec..9b389ea6 100644 --- a/src/audio_backend/jackaudio.rs +++ b/src/audio_backend/jackaudio.rs @@ -3,7 +3,6 @@ use super::{Open, Sink}; use jack::prelude::{AudioOutPort, AudioOutSpec, Client, JackControl, ProcessScope, AsyncClient, client_options, ProcessHandler, Port }; use std::sync::mpsc::{sync_channel, SyncSender, Receiver}; -#[allow(dead_code)] pub struct JackSink { send: SyncSender, active_client: AsyncClient<(),JackData>, @@ -16,10 +15,7 @@ pub struct JackData { } fn pcm_to_f32(sample: i16) -> f32 { - let mut f: f32 = sample as f32 / 32768.0; - if f > 1.0 { f = 1.0; } - if f < -1.0 { f = -1.0; } - f + sample as f32 / 32768.0; } impl ProcessHandler for JackData {