mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
fix(dmr): raise decoded voice level
This commit is contained in:
+2
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user