aboutsummaryrefslogtreecommitdiffstats
path: root/al/buffer.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-01-30 05:42:44 -0800
committerChris Robinson <[email protected]>2022-01-30 05:42:44 -0800
commit816bd8ab309dc0fe9afefcc5e3f2c294d3dc60a5 (patch)
tree75cf4b9c90bb3aa8d461b6a7dc417329bd2175d3 /al/buffer.cpp
parentc9d59ebc4a2c3566d34759a901be639b5f932e30 (diff)
Move ALSOFT_EAX definition to config.h
And disable it by default for non-Windows targets
Diffstat (limited to 'al/buffer.cpp')
-rw-r--r--al/buffer.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/al/buffer.cpp b/al/buffer.cpp
index a4967223..8a5bee25 100644
--- a/al/buffer.cpp
+++ b/al/buffer.cpp
@@ -56,7 +56,7 @@
#include "core/voice.h"
#include "opthelpers.h"
-#if ALSOFT_EAX
+#ifdef ALSOFT_EAX
#include "eax_globals.h"
#include "eax_x_ram.h"
#endif // ALSOFT_EAX
@@ -417,7 +417,7 @@ ALbuffer *AllocBuffer(ALCdevice *device)
void FreeBuffer(ALCdevice *device, ALbuffer *buffer)
{
-#if ALSOFT_EAX
+#ifdef ALSOFT_EAX
if (buffer->eax_x_ram_is_hardware)
{
const auto buffer_size = static_cast<ALsizei>(buffer->OriginalSize);
@@ -499,7 +499,7 @@ const ALchar *NameFromUserFmtType(UserFmtType type)
return "<internal type error>";
}
-#if ALSOFT_EAX
+#ifdef ALSOFT_EAX
bool eax_x_ram_validate_buffer(
ALCdevice& al_device,
ALbuffer& al_buffer)
@@ -731,7 +731,7 @@ void LoadData(ALCcontext *context, ALbuffer *ALBuf, ALsizei freq, ALuint size,
ALBuf->mLoopStart = 0;
ALBuf->mLoopEnd = ALBuf->mSampleLen;
-#if ALSOFT_EAX
+#ifdef ALSOFT_EAX
if (eax_g_is_enabled)
{
eax_x_ram_update_buffer(*context->mALDevice, *ALBuf);
@@ -1006,8 +1006,8 @@ START_API_FUNC
if UNLIKELY(!usrfmt)
context->setError(AL_INVALID_ENUM, "Invalid format 0x%04x", format);
else
-#if ALSOFT_EAX
{
+#ifdef ALSOFT_EAX
if (eax_g_is_enabled)
{
const auto is_buffer_valid = eax_x_ram_validate_buffer(*device, *albuf);
@@ -1021,9 +1021,7 @@ START_API_FUNC
#endif // ALSOFT_EAX
LoadData(context.get(), albuf, freq, static_cast<ALuint>(size), usrfmt->channels,
usrfmt->type, static_cast<const al::byte*>(data), flags);
-#if ALSOFT_EAX
}
-#endif // ALSOFT_EAX
}
}
END_API_FUNC
@@ -1777,7 +1775,7 @@ BufferSubList::~BufferSubList()
}
-#if ALSOFT_EAX
+#ifdef ALSOFT_EAX
ALboolean AL_APIENTRY EAXSetBufferMode(
ALsizei n,
const ALuint* buffers,
@@ -1932,5 +1930,4 @@ START_API_FUNC
}
END_API_FUNC
-
#endif // ALSOFT_EAX