oa::audio::mix_snr
Mix noise into signal at snr_db decibels signal-to-noise ratio. noise is scaled so its RMS sits snr_db below signal’s RMS before the two are summed. A 1e-8 floor on the noise RMS keeps zero-valued noise inputs finite. Both inputs must share channel count, sample count, sample rate, and layout. Errors Returns an error when snr_db is non-finite, the inputs’ audio contract differs, or an intermediate operation fails.
Function Documentation
Mix noise into signal at snr_db decibels signal-to-noise ratio. noise is scaled so its RMS sits snr_db below signal’s RMS before the two are summed. A 1e-8 floor on the noise RMS keeps zero-valued noise inputs finite. Both inputs must share channel count, sample count, sample rate, and layout. Errors Returns an error when snr_db is non-finite, the inputs’ audio contract differs, or an intermediate operation fails.