LAGonauta / MetaAudio

GoldSrc engine plugin for 3D sound
GNU General Public License v2.0
98 stars 14 forks source link

metaaudio fails to compile (c2466: cannot allocate an array of constant size 0) #49

Closed SalsaAlex closed 7 months ago

SalsaAlex commented 1 year ago

when i try to compile MetaAudio with "build-MetaAudio.bat", the compiler spews out only this error:

..GitHub\MetaAudio\externals\alure\src\context.cpp(229,24): error C2466: cannot allocate an array of constant size 0

and this is the exact line that causes this error in context.cpp:

const DecoderEntryPair sDefaultDecoders[] = {

i didn't modify any of the code, so i don't know why this happens. i tried fixing it by changing "const DecoderEntryPair sDefaultDecoders[]" to "std::vector sDefaultDecoders".. it compiles, but although the cvars of MetaAudio are present in the console, there's no audio in the game. i'm using visual studio 2019 to compile.

EDIT: nevermind, i was being dumb and didn't notice sndfile library was missing. now it compiles and works fine.

LAGonauta commented 7 months ago

Compiling MetaAudio should now be easier in the latest branch