summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-23 15:14:30 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:32:43 +0200
commit7a2dbd9112d9537453bb51a503858b769af32204 (patch)
treea22d211dbc943a08b64449e57961230736de671f /src/audio/sampman.h
parentThis means sound should be panned right, not volume (diff)
downloadre3-7a2dbd9112d9537453bb51a503858b769af32204.tar
re3-7a2dbd9112d9537453bb51a503858b769af32204.tar.gz
re3-7a2dbd9112d9537453bb51a503858b769af32204.tar.bz2
re3-7a2dbd9112d9537453bb51a503858b769af32204.tar.lz
re3-7a2dbd9112d9537453bb51a503858b769af32204.tar.xz
re3-7a2dbd9112d9537453bb51a503858b769af32204.tar.zst
re3-7a2dbd9112d9537453bb51a503858b769af32204.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 765c75d3..b5f72d5c 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
@@ -99,10 +100,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 1
-#define CHANNEL2D MAXCHANNELS
#define MAX_STREAMS 2
@@ -110,7 +110,13 @@ enum
#define DIGITALBITS 16
#define DIGITALCHANNELS 2
-#define MAX_DIGITAL_MIXER_CHANNELS 32
+#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" );
class cSampleManager
{