Open hinto-janai opened 1 year ago
The code for Audio is too entwined.
Audio
The major roles Audio plays is:
Kernel
AUDIO_STATE
The cause of most of these issues is the state + logic handling of AUDIO_STATE being half-baked into Audio:
"Given this signal, what will happen to the audio state?"
This is really hard to answer as it stands, because everything is so intertwined.
The goal should be small finite state machine, which AUDIO_STATE really is at its core.
The methods should be tied to the global AUDIO_STATE, not the Audio thread.
https://github.com/hinto-janai/sansan is basically a re-write of src/audio, extracted out into its own dedicated library.
src/audio
What
The code for
Audio
is too entwined.The major roles
Audio
plays is:Kernel
signal handlingAUDIO_STATE
state & logic managementProblems
The cause of most of these issues is the state + logic handling of
AUDIO_STATE
being half-baked intoAudio
:Goal
This is really hard to answer as it stands, because everything is so intertwined.
The goal should be small finite state machine, which
AUDIO_STATE
really is at its core.The methods should be tied to the global
AUDIO_STATE
, not theAudio
thread.