pub fn apply_soft_mask(
mixture_mag: &[f32],
mask: &[f32],
out: &mut [f32],
) -> Result<(), AudioError>Expand description
Apply a per-bin soft mask to a mixture magnitude spectrum: out[k] = mixture_mag[k] * mask[k].
mixture_mag: mixture magnitudes (any lengthN).mask:Nweights, each expected in[0, 1](all-ones passes the mixture through, all-zeros yields silence). Values outside[0, 1]are applied as-is (caller’s choice).out: at leastNfloats; bins0..Nare written.
§Errors
AudioError::InvalidParameterifmask.len() != mixture_mag.len().AudioError::OutputBufferTooSmallifoutis shorter thanmixture_mag.