Skip to content

Commit

Permalink
let SDL_Mixer do the actual sound mixing (#43)
Browse files Browse the repository at this point in the history
* add a dummy fx_mixer.c template

* let SDL_Mixer do the actual sound mixing

* fixes

* more fixes

* next fix

* add a SDL_Mixer version guard

* provide an alternative per-channel FX_SetVolume() implementation for SDL_Mixer < 2.6.0

* cosmetics

* immediately stop music on Windows in CP_Quit()

Instead of fading it out, that is, because on Windows changing the music
channel volume affects the sfx channels as well. Fixes #8
  • Loading branch information
fabiangreffrath authored Oct 17, 2023
1 parent eb6a51e commit 45a9203
Show file tree
Hide file tree
Showing 36 changed files with 447 additions and 6,813 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ AC_ARG_ENABLE([werror],
AS_IF([test "x$enable_werror" = "xyes"],
[CFLAGS="$CFLAGS -Werror"])

AC_CONFIG_FILES([Makefile rott/Makefile rott/audiolib/Makefile])
AC_CONFIG_FILES([Makefile rott/Makefile])
AC_OUTPUT
5 changes: 2 additions & 3 deletions rott/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
SUBDIRS = audiolib

bin_PROGRAMS = rott@SUFFIX@
rott@SUFFIX@_SOURCES = \
byteordr.c \
Expand All @@ -12,6 +10,7 @@ rott@SUFFIX@_SOURCES = \
dosutil.c \
dukemusc.c \
engine.c \
fx_mixer.c \
isr.c \
m_misc2.c \
modexlib.c \
Expand Down Expand Up @@ -53,4 +52,4 @@ rott@SUFFIX@_SOURCES = \
w_wad.c \
z_zone.c
rott@SUFFIX@_CFLAGS = @SDL_CFLAGS@ @SDL_mixer_CFLAGS@
rott@SUFFIX@_LDADD = audiolib/libaudiolib.a @SDL_LIBS@ @SDL_mixer_LIBS@
rott@SUFFIX@_LDADD = @SDL_LIBS@ @SDL_mixer_LIBS@
1 change: 1 addition & 0 deletions rott/_rt_soun.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ typedef struct
byte count;
int prevhandle;
int prevdistance;
void *chunk;
} sound_t;

#define SD_OVERWRITE 0x01
Expand Down
13 changes: 0 additions & 13 deletions rott/audiolib/Makefile.am

This file was deleted.

234 changes: 0 additions & 234 deletions rott/audiolib/_multivc.h

This file was deleted.

30 changes: 0 additions & 30 deletions rott/audiolib/debugio.h

This file was deleted.

83 changes: 0 additions & 83 deletions rott/audiolib/dma.h

This file was deleted.

Loading

0 comments on commit 45a9203

Please sign in to comment.