From 2f9e0525fe3a50565dceef604f7fd7969970104b Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Fri, 22 Mar 2024 18:20:38 -0400 Subject: [PATCH] User Toggle HPF on Digital; --- src/dsd_audio.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/dsd_audio.c b/src/dsd_audio.c index 54792b7..bef22e7 100644 --- a/src/dsd_audio.c +++ b/src/dsd_audio.c @@ -306,11 +306,11 @@ processAudio (dsd_opts * opts, dsd_state * state) *state->audio_out_float_buf_p = -32768.0F; } *state->audio_out_buf_p = (short) *state->audio_out_float_buf_p; - //tap the pointer here and store the short upsample buffer samples - state->s_lu[n] = (short) *state->audio_out_float_buf_p; //hpf if (opts->use_hpf_d == 1) - state->s_lu[n] = HPFilter_Update(&state->HRCFilterL, state->s_lu[n]); + *state->audio_out_float_buf_p = HPFilter_Update(&state->HRCFilterL, *state->audio_out_float_buf_p); + //tap the pointer here and store the short upsample buffer samples + state->s_lu[n] = (short) *state->audio_out_float_buf_p; state->audio_out_buf_p++; state->audio_out_float_buf_p++; } @@ -329,11 +329,11 @@ processAudio (dsd_opts * opts, dsd_state * state) *state->audio_out_temp_buf_p = -32768.0F; } *state->audio_out_buf_p = (short) *state->audio_out_temp_buf_p; - //tap the pointer here and store the short buffer samples - state->s_l[n] = (short) *state->audio_out_temp_buf_p; //hpf if (opts->use_hpf_d == 1) - state->s_l[n] = HPFilter_Update(&state->HRCFilterL, state->s_l[n]); + *state->audio_out_float_buf_p = HPFilter_Update(&state->HRCFilterL, *state->audio_out_float_buf_p); + //tap the pointer here and store the short buffer samples + state->s_l[n] = (short) *state->audio_out_temp_buf_p; //debug // fprintf (stderr, " %d", state->s_l[n]); state->audio_out_buf_p++; @@ -459,11 +459,11 @@ processAudioR (dsd_opts * opts, dsd_state * state) *state->audio_out_float_buf_pR = -32768.0F; } *state->audio_out_buf_pR = (short) *state->audio_out_float_buf_pR; - //tap the pointer here and store the short upsample buffer samples - state->s_ru[n] = (short) *state->audio_out_float_buf_pR; //hpf if (opts->use_hpf_d == 1) - state->s_ru[n] = HPFilter_Update(&state->HRCFilterR, state->s_ru[n]); + *state->audio_out_float_buf_pR = HPFilter_Update(&state->HRCFilterR, *state->audio_out_float_buf_pR); + //tap the pointer here and store the short upsample buffer samples + state->s_ru[n] = (short) *state->audio_out_float_buf_pR; state->audio_out_buf_pR++; state->audio_out_float_buf_pR++; } @@ -482,11 +482,11 @@ processAudioR (dsd_opts * opts, dsd_state * state) *state->audio_out_temp_buf_pR = -32768.0F; } *state->audio_out_buf_pR = (short) *state->audio_out_temp_buf_pR; - //tap the pointer here and store the short buffer samples - state->s_r[n] = (short) *state->audio_out_temp_buf_pR; //hpf if (opts->use_hpf_d == 1) - state->s_r[n] = HPFilter_Update(&state->HRCFilterR, state->s_r[n]); + *state->audio_out_float_buf_pR = HPFilter_Update(&state->HRCFilterR, *state->audio_out_float_buf_pR); + //tap the pointer here and store the short buffer samples + state->s_r[n] = (short) *state->audio_out_temp_buf_pR; state->audio_out_buf_pR++; state->audio_out_temp_buf_pR++; state->audio_out_idxR++;