quick & dirty leak checker
This commit is contained in:
@ -122,6 +122,10 @@ SOURCE=..\stb_image_write.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\stb_leakcheck.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\stb_perlin.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -162,6 +166,10 @@ SOURCE=.\test_truetype.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\test_vorbis.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\textedit_sample.c
|
||||
# End Source File
|
||||
# End Target
|
||||
|
18
tests/test_vorbis.c
Normal file
18
tests/test_vorbis.c
Normal file
@ -0,0 +1,18 @@
|
||||
#define STB_VORBIS_HEADER_ONLY
|
||||
#include "stb_vorbis.c"
|
||||
#include "stb.h"
|
||||
|
||||
extern void stb_vorbis_dumpmem(void);
|
||||
|
||||
#ifdef VORBIS_TEST
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
size_t memlen;
|
||||
unsigned char *mem = stb_fileu("c:/x/01.ogg", &memlen);
|
||||
int chan, samplerate;
|
||||
short *output;
|
||||
int samples = stb_vorbis_decode_memory(mem, memlen, &chan, &samplerate, &output);
|
||||
stb_vorbis_dumpmem();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user