Files
gen1recomp/src
laaledesiempre 3659252a88 fix(audio): honor POKEPORT_AUDIO_RATE in chip synth
The sbc/portmaster launcher exports POKEPORT_AUDIO_RATE=22050 and
docs/linux-arm-sbc.md describes it as halving synthesis CPU on
Cortex-A53 handhelds, but nothing in the engine read it: ChipSynth
always rendered at 44100 Hz, and snapTicks baked that rate in as the
integer rational 1470/512 (so once the rate does change, music plays
at half tempo/pitch unless snapTicks follows).

Read the env var at module load (validated to 8000-48000, 44100
fallback) and make snapTicks rate-aware.  At 44100 the new form is
arithmetically identical to the old one
((ticks*44100 + 7680)/15360 == (ticks*1470 + 256)/512), so desktop
behavior is unchanged.

Tested on an RG351MP (RK3326, dArkOS): correct music tempo and pitch
at 22050 Hz, halved synthesis work on the audio worker.
2026-08-30 20:57:02 -03:00
..
2026-07-29 11:46:32 -04:00
2026-08-24 07:52:05 -04:00
2026-08-24 08:48:24 -04:00
2026-08-28 10:14:44 -04:00