Add fixed-rate 40Hz sender with per-universe buffering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-01-31 07:31:12 -08:00
parent 13b10bebc7
commit 80a307da94
3 changed files with 79 additions and 36 deletions

View File

@@ -45,7 +45,8 @@ func FuzzRemap(f *testing.F) {
var srcData [512]byte
copy(srcData[:], inputData[:512])
outputs := engine.Remap(srcU, srcData)
engine.Remap(srcU, srcData)
outputs := engine.GetDirtyOutputs()
if len(outputs) != 1 {
t.Fatalf("expected 1 output, got %d", len(outputs))
@@ -84,7 +85,8 @@ func FuzzRemapMultipleMappings(f *testing.F) {
var srcData [512]byte
copy(srcData[:], inputData[:512])
outputs := engine.Remap(srcU, srcData)
engine.Remap(srcU, srcData)
outputs := engine.GetDirtyOutputs()
if len(outputs) != 2 {
t.Fatalf("expected 2 outputs, got %d", len(outputs))
@@ -129,9 +131,10 @@ func FuzzRemapUnmatchedUniverse(f *testing.F) {
var srcData [512]byte
copy(srcData[:], inputData[:512])
outputs := engine.Remap(otherU, srcData)
if outputs != nil {
t.Fatalf("expected nil output for unmatched universe, got %d outputs", len(outputs))
engine.Remap(otherU, srcData)
outputs := engine.GetDirtyOutputs()
if len(outputs) != 0 {
t.Fatalf("expected 0 outputs for unmatched universe, got %d outputs", len(outputs))
}
})
}