diff --git a/src/dsd_mbe.c b/src/dsd_mbe.c index bcb19d7..6969aa1 100644 --- a/src/dsd_mbe.c +++ b/src/dsd_mbe.c @@ -1058,9 +1058,10 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a } #endif + state->debug_audio_errors += state->errs2 + state->errs; + if (state->dmr_encL == 0 || opts->dmr_mute_encL == 0) { - state->debug_audio_errors += state->errs2; if (opts->audio_out == 1) { processAudio(opts, state); @@ -1128,9 +1129,10 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a } #endif + state->debug_audio_errorsR += state->errs2R + state->errsR; + if (state->dmr_encR == 0 || opts->dmr_mute_encR == 0) { - state->debug_audio_errorsR += state->errs2R; if (opts->audio_out == 1) { processAudioR(opts, state); @@ -1145,7 +1147,7 @@ processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char a //if using anything but DMR Stereo, borrowing state->dmr_encL to signal enc or clear for other types if (opts->dmr_mono == 0 && opts->dmr_stereo == 0 && (opts->unmute_encrypted_p25 == 1 || state->dmr_encL == 0) ) { - state->debug_audio_errors += state->errs2; + state->debug_audio_errors += state->errs2 + state->errs; if (opts->audio_out == 1) { processAudio(opts, state); diff --git a/src/nxdn_convolution.c b/src/nxdn_convolution.c index 27814e4..5a74413 100644 --- a/src/nxdn_convolution.c +++ b/src/nxdn_convolution.c @@ -36,13 +36,13 @@ /* Global variables ---------------------------------------------------------*/ -static const uint8_t CNXDNConvolution_BIT_MASK_TABLE[] = {0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04U, 0x02U, 0x01U}; +static const uint8_t CNXDNConvolution_BIT_MASK_TABLE[8] = {0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04U, 0x02U, 0x01U}; #define WRITE_BIT1(p,i,b) p[(i)>>3] = (b) ? (p[(i)>>3] | CNXDNConvolution_BIT_MASK_TABLE[(i)&7]) : (p[(i)>>3] & ~CNXDNConvolution_BIT_MASK_TABLE[(i)&7]) #define READ_BIT1(p,i) (p[(i)>>3] & CNXDNConvolution_BIT_MASK_TABLE[(i)&7]) -static const uint8_t CNXDNConvolution_BRANCH_TABLE1[] = {0U, 0U, 0U, 0U, 2U, 2U, 2U, 2U}; -static const uint8_t CNXDNConvolution_BRANCH_TABLE2[] = {0U, 2U, 2U, 0U, 0U, 2U, 2U, 0U}; +static const uint8_t CNXDNConvolution_BRANCH_TABLE1[8] = {0U, 0U, 0U, 0U, 2U, 2U, 2U, 2U}; +static const uint8_t CNXDNConvolution_BRANCH_TABLE2[8] = {0U, 2U, 2U, 0U, 0U, 2U, 2U, 0U}; static const unsigned int CNXDNConvolution_NUM_OF_STATES_D2 = 8U; //static const unsigned int CNXDNConvolution_NUM_OF_STATES = 16U;