diff --git a/.gitignore b/.gitignore index a5479df..7b50dfa 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ debug/ target/ testaudio/ +build_release.sh # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html diff --git a/Cargo.toml b/Cargo.toml index 3fe1206..c3d3496 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,18 +12,23 @@ keywords = ["cli"] categories = ["command-line-utilities"] [dependencies] +# Rendering stuff bevy = "0.13.0" bevy_egui = "0.25.0" -bincode = "1.3.3" -clap = { version = "4.5.0", features = ["derive"] } -microfft = "0.5.1" -rayon = "1.9.0" + +# Audio playback and FFT computation rodio = "0.17.3" +spectrum-analyzer = "1.5.0" + +# CLI argument parsing +clap = { version = "4.5.0", features = ["derive"] } + +# Utilities serde = { version = "1.0.197", features = ["derive"] } -dirs = "5.0.1" serde_yaml = "0.9.32" -spectrum-analyzer = "1.5.0" +bincode = "1.3.3" stopwatch = "0.0.7" +dirs = "5.0.1" [profile.release] strip = true diff --git a/src/fft.rs b/src/fft.rs index 9a0853d..f064963 100644 --- a/src/fft.rs +++ b/src/fft.rs @@ -1,5 +1,4 @@ use bincode::{deserialize, serialize}; -use rayon::iter::{IntoParallelIterator, ParallelIterator}; use rodio::{source::Source, Decoder, OutputStream}; use serde::{Deserialize, Serialize}; use spectrum_analyzer::scaling::divide_by_N_sqrt; @@ -71,7 +70,7 @@ pub fn intensity_normalize_fft(mut fft: FFT, bounds: &[f32], scaling_factor: &[f } x }; - fft.fft = fft.fft.into_par_iter().map(|x| rescale(x)).collect(); + fft.fft = fft.fft.into_iter().map(|x| rescale(x)).collect(); fft } @@ -85,7 +84,7 @@ pub fn frequency_normalize_fft(mut fft: FFT, scaling_factor: &[f32]) -> FFT { } x }; - fft.fft = fft.fft.into_par_iter().map(|x| rescale(x)).collect(); + fft.fft = fft.fft.into_iter().map(|x| rescale(x)).collect(); fft } diff --git a/src/main.rs b/src/main.rs index c793e5c..7dd4fa5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,6 @@ use systems::update_view_settings::*; use bevy::prelude::*; use bevy_egui::EguiPlugin; -use rayon::iter::{IntoParallelRefMutIterator, ParallelIterator}; use rodio::{Decoder, OutputStream}; use std::ffi::OsString; use std::fs::File; @@ -117,7 +116,7 @@ fn compute_and_preprocess_fft(fp: &PathBuf, args: &FFTArgs) -> Vec> { } fft_vec - .par_iter_mut() + .iter_mut() .for_each(|x| space_interpolate(x, args.smoothness)); if args.debug { println!("Interpolated in {:?}", now.elapsed());