From ea006fbf0218dafb23fb75940b460b5072a59232 Mon Sep 17 00:00:00 2001 From: Nicholas Fasching <91689117+njfdev@users.noreply.github.com> Date: Tue, 30 Jul 2024 14:42:01 -0400 Subject: [PATCH] Fix Warnings In Release Related to WavWriter --- src-tauri/src/custom_radiorust_blocks.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/custom_radiorust_blocks.rs b/src-tauri/src/custom_radiorust_blocks.rs index 35fc783..6230962 100644 --- a/src-tauri/src/custom_radiorust_blocks.rs +++ b/src-tauri/src/custom_radiorust_blocks.rs @@ -1,14 +1,17 @@ pub mod custom_radiorust_blocks { + use std::{collections::VecDeque, f64::consts::PI}; + + use biquad::{self, Biquad, Coefficients, DirectForm1, ToHertz, Type, Q_BUTTERWORTH_F64}; + + #[cfg(debug_assertions)] + use hound::{WavSpec, WavWriter}; + #[cfg(debug_assertions)] use std::{ - collections::VecDeque, - f64::consts::PI, fs, io::BufWriter, sync::{Arc, Mutex}, }; - use biquad::{self, Biquad, Coefficients, DirectForm1, ToHertz, Type, Q_BUTTERWORTH_F64}; - use hound::{WavSpec, WavWriter}; use nalgebra::{SMatrix, SVector}; use radiorust::{ flow::{new_receiver, new_sender, ReceiverConnector, SenderConnector}, @@ -284,6 +287,7 @@ pub mod custom_radiorust_blocks { let (mut receiver, receiver_connector) = new_receiver::>>(); // setup Wav file writer + #[cfg(debug_assertions)] let wav_writer: Arc>>>> = Arc::new(Mutex::new(None));