Fix compilation errors with AL local headers (#705)
Some checks failed
Build branch / build-all (push) Failing after 48s
CodeQL / Analyze (push) Has been cancelled

* Remove alext inclusion as it's included by qal.h already

* Update local AL headers
This commit is contained in:
smallmodel 2025-03-22 23:45:41 +01:00 committed by GitHub
parent 3c15588292
commit 50e3aa1f61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 1348 additions and 485 deletions

View file

@ -26,12 +26,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "../server/server.h"
#include "snd_codec.h"
#if defined(_MSC_VER) || defined(__APPLE__)
# include <alext.h>
#else
# include <AL/alext.h>
#endif
typedef struct {
const char *funcname;
void **funcptr;
@ -3102,10 +3096,12 @@ bool openal_channel::set_sfx(sfx_t *pSfx)
qalGenBuffers(1, &pSfx->buffer);
alDieIfError();
#if AL_SOFT_block_alignment
if (pSfx->info.dataalign > 1) {
qalBufferi(pSfx->buffer, AL_UNPACK_BLOCK_ALIGNMENT_SOFT, pSfx->info.dataalign);
alDieIfError();
}
#endif
qalBufferData(
pSfx->buffer,
@ -4484,10 +4480,12 @@ bool openal_channel_two_d_stream::set_sfx(sfx_t *pSfx)
return true;
}
#if AL_SOFT_block_alignment
if (stream->info.dataalign > 1 && soft_block_align) {
qalBufferi(buffers[currentBuf], AL_UNPACK_BLOCK_ALIGNMENT_SOFT, stream->info.dataalign);
alDieIfError();
}
#endif
qalBufferData(buffers[currentBuf], pSfx->info.format, rawData, bytesRead, stream->info.rate);
alDieIfError();
@ -4628,10 +4626,12 @@ void openal_channel_two_d_stream::update()
}
}
#if AL_SOFT_block_alignment
if (stream->info.dataalign > 1 && soft_block_align) {
qalBufferi(buffers[currentBuf], AL_UNPACK_BLOCK_ALIGNMENT_SOFT, stream->info.dataalign);
alDieIfError();
}
#endif
qalBufferData(buffers[currentBuf], format, rawData, bytesRead, stream->info.rate);
alDieIfError();