if i fuck up the prec it seems to sound way better

This commit is contained in:
Soph :3 2025-11-11 11:36:09 +02:00
parent 81337b7f4b
commit 7007e66f7c
4 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/target /target
push.sh push.sh
u2c.py u2c.py
version

View file

@ -1,7 +1,7 @@
local char, byte, floor, band, rshift = string.char, string.byte, math.floor, bit32.band, bit32.arshift local char, byte, floor, band, rshift = string.char, string.byte, math.floor, bit32.band, bit32.arshift
local PREC = 8 local PREC = 10
local PREC_POW = 2 ^ PREC local PREC_POW = 2 ^ PREC
local PREC_POW_HALF = 2 ^ (PREC - 1) local PREC_POW_HALF = 2 ^ (PREC - 1)
local STRENGTH_MIN = 2 ^ (PREC - 8 + 1) local STRENGTH_MIN = 2 ^ (PREC - 8 + 1)

View file

@ -50,7 +50,7 @@ function ui()
end end
local dcode = require "dcode" local dcode = require "dcode"
local make_decoder = dcode.make_dec local make_decoder = dcode.make_truebit_dec
local ws = http.websocket("ws://vps.sad.ovh:5821/ws") local ws = http.websocket("ws://vps.sad.ovh:5821/ws")

View file

@ -506,7 +506,7 @@ struct DfpwmEncoder {
} }
impl DfpwmEncoder { impl DfpwmEncoder {
const CONST_PREC: i32 = 10; const CONST_PREC: i32 = 8;
fn new() -> Self { fn new() -> Self {
Self { q: 0, s: 0, lt: -128 } Self { q: 0, s: 0, lt: -128 }