pub fn load_audio_file<P>(
loader: &mut SymphoniumLoader,
path: P,
target_sample_rate: Option<NonZero<u32>>,
resample_quality: ResampleQuality,
) -> Result<DecodedAudio, LoadError>Expand description
A helper method to load an audio file from a path using Symphonium.
loader- The symphonium loader.- `path`` - The path to the audio file stored on disk.
target_sample_rate- If this isSome, then the file will be resampled to match the given target sample rate. (No resampling will occur if the audio file’s sample rate is already the target sample rate). If this isNone, then the file will not be resampled and stay its original sample rate.resample_quality- The quality of the resampler to use if the sample rate of the audio file doesn’t match thetarget_sample_rate. This has no effect iftarget_sample_rateisNone.