Struct libsoxr::spec::RuntimeSpec
source · pub struct RuntimeSpec { /* private fields */ }
Expand description
Runtime parameters for resampler. Can be used to control number of threads the resampler uses. Wrapper for soxr_runtime_spec_t
Implementations§
source§impl RuntimeSpec
impl RuntimeSpec
sourcepub fn new(num_threads: u32) -> RuntimeSpec
pub fn new(num_threads: u32) -> RuntimeSpec
creates a new RuntimeSpec
for num_threads
threads
use libsoxr::{Soxr, RuntimeSpec};
let spec = RuntimeSpec::new(4);
let soxr = Soxr::create(96000.0, 44100.0, 2, None, None, Some(&spec));
assert!(soxr.is_ok());