nothings / stb

stb single-file public domain libraries for C/C++
https://twitter.com/nothings
Other
26.37k stars 7.68k forks source link

No overridable allocator for stb_vorbis #1210

Open moon-chilled opened 2 years ago

moon-chilled commented 2 years ago

I thought I could define STB_VORBIS_NO_CRT and redefine malloc/free as described here, but that page seems to be out-of-date; allocation functions are always stubbed in that mode. #define malloc... should at least be guarded by an 'ifdef'.

Aside: #define realloc(s) 0 is wrong; realloc has two parameters.

musicinmybrain commented 2 years ago

Aside: #define realloc(s) 0 is wrong; realloc has two parameters.

Related PR and discussion: https://github.com/nothings/stb/pull/1198