Remove macOS specific debugging code
This commit is contained in:
@@ -5,6 +5,3 @@ edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
nih_plug = { git = "https://github.com/robbert-vdh/nih-plug", version = "0.0.0", default-features = false }
|
||||
log = "0.4.28"
|
||||
simplelog = "0.12.2"
|
||||
crossbeam = "0.8.4"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::{BiquadFilter, BiquadFilterState, Processor};
|
||||
use crate::{BiquadFilter, Processor};
|
||||
|
||||
#[derive(Debug, Default, Clone)]
|
||||
pub struct EqualizerState {
|
||||
|
||||
@@ -10,19 +10,15 @@ mod smoother;
|
||||
mod traits;
|
||||
|
||||
use std::{
|
||||
fmt::Debug, ops::Add, panic, time::Duration
|
||||
fmt::Debug, ops::Add, time::Duration
|
||||
};
|
||||
|
||||
pub use amplitude::Amplitude;
|
||||
pub use biquad::{BiquadFilter, BiquadFilterState, FilterMode, Slope};
|
||||
pub use comp::{Compressor, CompressorState};
|
||||
use crossbeam::atomic::AtomicCell;
|
||||
pub use decibel::Decibel;
|
||||
pub use eq::{Equalizer, EqualizerState};
|
||||
pub use freq_split::{FreqSplitter, FreqSplitterState};
|
||||
use log::{error, info};
|
||||
use nih_plug::{nih_error, util::permit_alloc};
|
||||
use simplelog::{CombinedLogger, Config, SimpleLogger, WriteLogger};
|
||||
pub use traits::{FloatFormatter, IntFormatter, Lerp, Processor};
|
||||
|
||||
pub struct Rect<T> {
|
||||
@@ -199,26 +195,3 @@ pub fn rms<const N: usize>(sample_buffer: &RingBuffer<f64, N>, last_rms: f64) ->
|
||||
+ (1.0 / N as f64) * (sample_buffer[0].powf(2.0) - sample_buffer[N - 1].powf(2.0))
|
||||
}
|
||||
|
||||
static LOGGER: AtomicCell<Option<Box<CombinedLogger>>> = AtomicCell::new(None);
|
||||
|
||||
pub fn init() {
|
||||
permit_alloc(|| {
|
||||
let log_file = std::fs::File::create("airfreshener.log").unwrap();
|
||||
let term_log = SimpleLogger::new(log::LevelFilter::Debug, Config::default());
|
||||
let file_log = WriteLogger::new(log::LevelFilter::Debug, Config::default(), log_file);
|
||||
LOGGER.store(Some(simplelog::CombinedLogger::new(vec![
|
||||
term_log, file_log,
|
||||
])));
|
||||
info!("Log check");
|
||||
panic::set_hook(Box::new(|info| {
|
||||
if let Some(str) = info.payload().downcast_ref::<String>() {
|
||||
error!("Panic! {str}\n{:?}", info.location());
|
||||
nih_error!("Panic! {str}\n{:?}", info.location());
|
||||
}
|
||||
else {
|
||||
error!("Panic! No info provided.\n{:?}", info.location());
|
||||
nih_error!("Panic! No info provided.\n{:?}", info.location());
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user