From b7dd57c64fc8607c1bf08ba00fdaa1fdb200037d Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 14 Jul 2026 20:23:49 +0300 Subject: [PATCH] fix(dmr): raise decoded voice level --- DMRDecoder.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DMRDecoder.pas b/DMRDecoder.pas index 0190ca7..c834aeb 100644 --- a/DMRDecoder.pas +++ b/DMRDecoder.pas @@ -190,6 +190,7 @@ const // mbelib's floating-point API retains the signed 16-bit PCM scale. EWSDR's // audio outputs use normalized floating point, where full scale is +/-1.0. DMR_PCM_SCALE = 1.0 / 32768.0; + DMR_PCM_GAIN = 1.5; // +3.5 dB nominal voice level before user volume DMR_SUPERFRAME_SAMPLES = DMR_INPUT_RATE * 360 div 1000; DMR_SYNC_CADENCE_TOLERANCE = DMR_SAMPLES_PER_SYM * 3; @@ -823,7 +824,7 @@ begin if MbeResult.ErrorsTotal > 0 then Inc(FVoiceErrorCount, MbeResult.ErrorsTotal); for SampleIndex := 0 to High(PCM) do begin - PCM[SampleIndex] := PCM[SampleIndex] * DMR_PCM_SCALE; + PCM[SampleIndex] := PCM[SampleIndex] * DMR_PCM_SCALE * DMR_PCM_GAIN; if PCM[SampleIndex] > 1.0 then PCM[SampleIndex] := 1.0 else if PCM[SampleIndex] < -1.0 then PCM[SampleIndex] := -1.0; end;