9c28d5a3b7797290e985496221af01caea3ca9c9
- Extracted src/dusk/audio/mixer/audiomixerchannel.{h,c}: the channel enum,
command/state structs, and all per-channel logic (StopStream,
ApplyVolume, ChannelUpdateEarly/Late) now live there; audiomixer.{h,c}
just holds the channel array and the public Play/PlayLooped/Stop API.
- Removed audioMixerSetChannelVolume()/audioMixerSetMasterVolume() - volume
is written directly (SAVE.settings.audioChannelVolume[channel] = 0.3f,
SAVE.settings.audioMasterVolume = 0.3f) and only ever validated where
it's read, in audioMixerChannelApplyVolume().
- Moved master/channel volume into savesettings_t (new writeFloatArray/
readFloatArray save-JSON macros) so they persist as user preferences;
`fade` moved from an unused mixer-wide array to a real per-channel
multiplier that's now actually folded into the volume calculation.
- audioMixerUpdateEarly()/Late() now catch and log a single channel's
error instead of letting it abort every other channel's update for that
frame (and cascade into skipping the rest of that frame's engine
update), matching the existing per-stream error-isolation pattern.
- Added persistent per-channel onLoop/onEnd callbacks + a user pointer
(audiomixerchannelstate_t), wired onto every stream a channel starts via
a trampoline (audioMixerChannelOnStreamLoop/OnStreamEnd) so they survive
across multiple plays on the same channel, unlike the underlying stream
instance itself.
- General cleanup: for loops -> while loops, if/else cascades -> guard
clauses, dropped unnecessary const on locals, wrapped to 80 columns.
Built and verified on Linux, PSP (Docker), GameCube (Docker) and Wii
(Docker).
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Dusk
RPG Game Project, small and able to run on a PSP.
Building
Each build target has different requirements. You can take a look at the git workflow to see how the builds are done for each target. In addition, for accessing the editor and building the game on your host system, install the following packages, depending on your system;
Fedora;
sudo dnf install git make gcc cmake python python-polib python3-pillow python3-dotenv python3-numpy python-qt5 python3-pyopengl SDL2-devel zlib-devel libzip-devel bzip2-devel openssl-devel lzma-sdk-devel xz xz-devel lua-devel
Ubuntu;
sudo apt-get install git build-essential gcc python python-polib python3-pillow python3-dotenv python3-numpy python3-pyqt5 python3-opengl
Arch Linux;
sudo pacman -S git base-devel gcc python python-polib python-pillow python-dotenv python-numpy python-pyqt5 python-opengl
Languages
C
89.7%
JavaScript
3.5%
CMake
3.1%
Python
2.1%
HTML
0.8%
Other
0.7%