Commit 7e4b99a
committed
Vocoder Fix
Based upon some LLM analysis, Claude did the following:
Summary
# Issue Verdict Action
1 Uninitialized error_history_sqrt Real bug (High) Fixed: initialized to 0.0
2 Uninitialized samples_buf Real bug (High) Fixed: added memset to zero buffer
3 uint16_t* type mismatch Real bug (Medium) Fixed: changed to int16_t*
4 uint32_t to int16_t truncation Low risk, defensive Fixed: added & 0xFFFF mask
5 Missing default in fr_type switch Real (Medium) Fixed: initialized fr_type = FT_4V_0
6 crc12 returns 0 on overflow Not practical Skipped — not an audio issue
7 msg_len uninitialized for 0x01/0x21 False positive — b1b2 is always 0 for those opcodes Added defensive init to 0 anyway
8 Loop variable shadowing Not a bug Skipped — cosmetic only
The two highest-impact fixes for audio quality are Issue 1 (spike detection was comparing against garbage, making error tracking unreliable) and Issue 2 (stack garbage was being pushed directly to the audio output when frames had high error rates, producing pops/noise instead of silence).1 parent 6c00945 commit 7e4b99a
File tree
3 files changed
+6
-5
lines changed- lib/op25_repeater/lib
3 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
876 | | - | |
| 876 | + | |
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
| |||
906 | 906 | | |
907 | 907 | | |
908 | 908 | | |
909 | | - | |
| 909 | + | |
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
| 397 | + | |
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
| 699 | + | |
699 | 700 | | |
700 | 701 | | |
701 | 702 | | |
| |||
704 | 705 | | |
705 | 706 | | |
706 | 707 | | |
707 | | - | |
| 708 | + | |
708 | 709 | | |
709 | 710 | | |
710 | 711 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
0 commit comments