mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-28 08:49:45 -05:00
Broadcast FM de-emphasis using 75us time constant.
This commit is contained in:
parent
2e90edbf39
commit
0e04939439
@ -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__*/
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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__*/
|
||||
|
Loading…
Reference in New Issue
Block a user