Split audio into stream/ and mixer/ subdirs, fix resulting build breaks

Reorganizes src/dusk/audio/: individual stream implementations
(audiostream, audiostreampcm, audiostreammp3, audiostreammp3decodersw)
move into audio/stream/, and a new audio/mixer/ holds a channel-based
playback queue (audiomixer.c/.h) for future use - not yet wired into
the engine.

Fixes needed to keep the tree buildable after the move:
 - A stray duplicate of audiostreammp3decodersw.c/.h was left at the old
   flat path; removed in favor of the canonical copy in stream/.
 - Updated every #include "audio/audiostream*.h" and the two platform
   CMakeLists.txt (dusklinux, duskdolphin) that still pointed at the old
   flat location.
 - audiomixer.c/.h didn't compile: audiomixerqueue_t was referenced but
   never defined (audiomixerchanneldata_t has the matching fields), a
   trailing comma in audioMixerPlayLooped's parameter list is illegal in
   C, and `file` was declared as an array of pointers instead of a char
   buffer.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
2026-09-02 09:32:41 -05:00
co-authored by Claude Sonnet 5
parent 62c081ecf2
commit 3ee0a53688
22 changed files with 242 additions and 16 deletions
+1 -1
View File
@@ -20,5 +20,5 @@ endif()
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC minimp3)
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
"${DUSK_SOURCES_DIR}/dusk/audio/audiostreammp3decodersw.c"
"${DUSK_SOURCES_DIR}/dusk/audio/stream/audiostreammp3decodersw.c"
)
+1 -1
View File
@@ -6,7 +6,7 @@
*/
#include "audiostreamlinux.h"
#include "audio/audiostream.h"
#include "audio/stream/audiostream.h"
#include "assert/assert.h"
#include "util/memory.h"
#include "util/math.h"
+1 -1
View File
@@ -10,4 +10,4 @@
// Linux has no hardware MP3 decoder to prefer, so it uses the shared
// minimp3-based software backend (also used by Dolphin) - see that
// header's own documentation for the actual struct/interface.
#include "audio/audiostreammp3decodersw.h"
#include "audio/stream/audiostreammp3decodersw.h"