summaryrefslogtreecommitdiffstats
path: root/src/audio/oal
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:34:33 +0200
commit02655313e9726a044dcecdeb143c261614d00f0f (patch)
treed019ad3353e749dc17dd3bfac885cd3d97558d5f /src/audio/oal
parentFix MAX_DIGITAL_MIXER_CHANNELS (diff)
downloadre3-02655313e9726a044dcecdeb143c261614d00f0f.tar
re3-02655313e9726a044dcecdeb143c261614d00f0f.tar.gz
re3-02655313e9726a044dcecdeb143c261614d00f0f.tar.bz2
re3-02655313e9726a044dcecdeb143c261614d00f0f.tar.lz
re3-02655313e9726a044dcecdeb143c261614d00f0f.tar.xz
re3-02655313e9726a044dcecdeb143c261614d00f0f.tar.zst
re3-02655313e9726a044dcecdeb143c261614d00f0f.zip
Diffstat (limited to 'src/audio/oal')
-rw-r--r--src/audio/oal/channel.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/audio/oal/channel.cpp b/src/audio/oal/channel.cpp
index 1bb4c4a8..04e7e529 100644
--- a/src/audio/oal/channel.cpp
+++ b/src/audio/oal/channel.cpp
@@ -10,9 +10,9 @@
extern bool IsFXSupported();
-ALuint alSources[MAXCHANNELS+MAX2DCHANNELS];
-ALuint alFilters[MAXCHANNELS+MAX2DCHANNELS];
-ALuint alBuffers[MAXCHANNELS+MAX2DCHANNELS];
+ALuint alSources[NUM_CHANNELS];
+ALuint alFilters[NUM_CHANNELS];
+ALuint alBuffers[NUM_CHANNELS];
bool bChannelsCreated = false;
int32 CChannel::channelsThatNeedService = 0;
@@ -22,10 +22,10 @@ uint8 tempStereoBuffer[PED_BLOCKSIZE * 2];
void
CChannel::InitChannels()
{
- alGenSources(MAXCHANNELS+MAX2DCHANNELS, alSources);
- alGenBuffers(MAXCHANNELS+MAX2DCHANNELS, alBuffers);
+ alGenSources(NUM_CHANNELS, alSources);
+ alGenBuffers(NUM_CHANNELS, alBuffers);
if (IsFXSupported())
- alGenFilters(MAXCHANNELS + MAX2DCHANNELS, alFilters);
+ alGenFilters(NUM_CHANNELS, alFilters);
bChannelsCreated = true;
}
@@ -34,13 +34,13 @@ CChannel::DestroyChannels()
{
if (bChannelsCreated)
{
- alDeleteSources(MAXCHANNELS + MAX2DCHANNELS, alSources);
+ alDeleteSources(NUM_CHANNELS, alSources);
memset(alSources, 0, sizeof(alSources));
- alDeleteBuffers(MAXCHANNELS + MAX2DCHANNELS, alBuffers);
+ alDeleteBuffers(NUM_CHANNELS, alBuffers);
memset(alBuffers, 0, sizeof(alBuffers));
if (IsFXSupported())
{
- alDeleteFilters(MAXCHANNELS + MAX2DCHANNELS, alFilters);
+ alDeleteFilters(NUM_CHANNELS, alFilters);
memset(alFilters, 0, sizeof(alFilters));
}
bChannelsCreated = false;