diff --git a/Cargo.toml b/Cargo.toml index 12e277b..aae2dd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rubato" -version = "0.16.0" +version = "0.16.1" rust-version = "1.61" authors = ["HEnquist "] description = "Asynchronous resampling library intended for audio data" diff --git a/benches/resamplers.rs b/benches/resamplers.rs index decdbe5..6e43e8a 100644 --- a/benches/resamplers.rs +++ b/benches/resamplers.rs @@ -10,11 +10,13 @@ use rubato::sinc_interpolator::sinc_interpolator_neon::NeonInterpolator; #[cfg(target_arch = "x86_64")] use rubato::sinc_interpolator::sinc_interpolator_sse::SseInterpolator; +#[cfg(feature = "fft_resampler")] +use rubato::FftFixedIn; use rubato::{ - FastFixedIn, FftFixedIn, PolynomialDegree, Resampler, SincFixedIn, SincInterpolationType, - WindowFunction, + FastFixedIn, PolynomialDegree, Resampler, SincFixedIn, SincInterpolationType, WindowFunction, }; +#[cfg(feature = "fft_resampler")] fn bench_fftfixedin(c: &mut Criterion) { let chunksize = 1024; let mut resampler = FftFixedIn::::new(44100, 192000, 1024, 2, 1).unwrap(); @@ -24,6 +26,7 @@ fn bench_fftfixedin(c: &mut Criterion) { }); } +#[cfg(feature = "fft_resampler")] fn bench_fftfixedin_32(c: &mut Criterion) { let chunksize = 1024; let mut resampler = FftFixedIn::::new(44100, 192000, 1024, 2, 1).unwrap(); @@ -350,11 +353,12 @@ bench_fast_async_resampler!( "fast async nearest 64" ); +#[cfg(feature = "fft_resampler")] +criterion_group!(fft_benches, bench_fftfixedin, bench_fftfixedin_32,); + #[cfg(target_arch = "x86_64")] criterion_group!( benches, - bench_fftfixedin, - bench_fftfixedin_32, bench_fast_async_septic_32, bench_fast_async_quintic_32, bench_fast_async_cubic_32, @@ -388,8 +392,6 @@ criterion_group!( #[cfg(target_arch = "aarch64")] criterion_group!( benches, - bench_fftfixedin, - bench_fftfixedin_32, bench_fast_async_septic_32, bench_fast_async_quintic_32, bench_fast_async_cubic_32, @@ -414,4 +416,7 @@ criterion_group!( bench_neon_async_nearest_64, ); +#[cfg(feature = "fft_resampler")] +criterion_main!(benches, fft_benches); +#[cfg(not(feature = "fft_resampler"))] criterion_main!(benches);