Broadcast FM de-emphasis using 75us time constant.

This commit is contained in:
Jared Boone 2016-01-01 20:56:30 -08:00
parent 2e90edbf39
commit 0e04939439
3 changed files with 11 additions and 0 deletions

View File

@ -48,4 +48,12 @@ constexpr iir_biquad_config_t audio_deemph_300_6_config {
{ 1.00000000f, -0.96148145f, 0.00000000f, },
};
// 75us RC time constant, used in broadcast FM in Americas, South Korea
// scipy.signal.butter(1, 2122 / 24000.0, 'lowpass', analog=False)
// NOTE: Technically, order-1 filter, b[2] = a[2] = 0.
constexpr iir_biquad_config_t audio_deemph_2122_6_config {
{ 0.12264116f, 0.12264116f, 0.00000000f, },
{ 1.00000000f, -0.75471767f, 0.00000000f, },
};
#endif/*__DSP_IIR_CONFIG_H__*/

View File

@ -68,5 +68,7 @@ void WidebandFMAudio::execute(const buffer_c8_t& buffer) {
/* -> 48kHz int16_t[32] */
audio_hpf.execute_in_place(audio);
audio_deemph.execute_in_place(audio);
fill_audio_buffer(audio);
}

View File

@ -50,6 +50,7 @@ private:
dsp::decimate::FIR64AndDecimateBy2Real audio_filter { audio_filter_taps.taps };
IIRBiquadFilter audio_hpf { audio_hpf_30hz_config };
IIRBiquadFilter audio_deemph { audio_deemph_2122_6_config };
};
#endif/*__PROC_WFM_AUDIO_H__*/