pub struct MDCTNaive<T> { /* fields omitted */ }
Naive O(n^2 ) MDCT implementation
This implementation is primarily used to test other MDCT algorithms.
use rustdct::mdct::{MDCT, MDCTNaive, window_fn};
let len = 124;
let mut input: Vec<f32> = vec![0f32; len * 2];
let mut output: Vec<f32> = vec![0f32; len];
let dct = MDCTNaive::new(len, window_fn::mp3);
dct.process_mdct(&input, &mut output);
Creates a new MDCT context that will process inputs of length output_len * 2
and produce
outputs of length output_len
output_len
must be even.
window_fn
is a function that takes a size
and returns a Vec
containing size
window values.
See the window_fn
module for provided window functions.
Computes the MDCT on the input
buffer and places the result in the output
buffer. Uses input_a
for the first half of the input, and input_b
for the second half of the input Read more
Computes the IMDCT on the input
buffer and places the result in the output
buffer. Puts the first half of the output in output_a
, and puts the first half of the output in output_b
. Read more
Computes the MDCT on the input
buffer and places the result in the output
buffer. Read more
Computes the IMDCT on the input
buffer and places the result in the output
buffer. Read more
The FFT size that this algorithm can process
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static