summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-23 15:47:16 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:45:18 +0200
commit60bb16d26c720bc9f122824f6cdb373e2c359e2d (patch)
tree77b470d6c36827beeba38e741c6887ad71affe64 /src/audio/sampman.h
parentFix MAX_DIGITAL_MIXER_CHANNELS (diff)
downloadre3-60bb16d26c720bc9f122824f6cdb373e2c359e2d.tar
re3-60bb16d26c720bc9f122824f6cdb373e2c359e2d.tar.gz
re3-60bb16d26c720bc9f122824f6cdb373e2c359e2d.tar.bz2
re3-60bb16d26c720bc9f122824f6cdb373e2c359e2d.tar.lz
re3-60bb16d26c720bc9f122824f6cdb373e2c359e2d.tar.xz
re3-60bb16d26c720bc9f122824f6cdb373e2c359e2d.tar.zst
re3-60bb16d26c720bc9f122824f6cdb373e2c359e2d.zip
Diffstat (limited to 'src/audio/sampman.h')
-rw-r--r--src/audio/sampman.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/audio/sampman.h b/src/audio/sampman.h
index 0b76a203..b0de6ea7 100644
--- a/src/audio/sampman.h
+++ b/src/audio/sampman.h
@@ -1,5 +1,6 @@
#pragma once
#include "AudioSamples.h"
+#include "audio_enums.h"
#define MAX_VOLUME 127
#define MAX_FREQ DIGITALRATE
@@ -115,10 +116,9 @@ enum
#define MAXPROVIDERS 64
-#define MAXCHANNELS 28
-#define MAXCHANNELS_SURROUND 24
+#define MAXCHANNELS (NUM_CHANNELS_GENERIC+1)
+#define MAXCHANNELS_SURROUND (MAXCHANNELS-4)
#define MAX2DCHANNELS 3
-#define CHANNEL2D MAXCHANNELS
#define MAX_STREAMS 1
@@ -126,7 +126,13 @@ enum
#define DIGITALBITS 16
#define DIGITALCHANNELS 2
-#define MAX_DIGITAL_MIXER_CHANNELS 34
+#ifdef FIX_BUGS
+#define MAX_DIGITAL_MIXER_CHANNELS (MAXCHANNELS+MAX_STREAMS*2+MAX2DCHANNELS)
+#else
+#define MAX_DIGITAL_MIXER_CHANNELS (MAXCHANNELS+MAX_STREAMS*2)
+#endif
+
+static_assert( NUM_CHANNELS == MAXCHANNELS + MAX2DCHANNELS, "The number of channels doesn't match with an enum" );
extern int gBankStartOffset[67];