-Fixed a bug that only showed up when I was compiling with mingw(I guess microsoft compilers must handle free()'s to invalid pointers a lot better)

This commit is contained in:
cyberwarriorx 2006-12-09 05:19:56 +00:00
parent 567d403a3e
commit 7ab8846882
1 changed files with 2 additions and 0 deletions

View File

@ -140,6 +140,8 @@ int SPU_Init(int coreid, int buffersize)
if ((SPU = (SPU_struct *)malloc(sizeof(SPU_struct))) == NULL)
return -1;
memset((void *)SPU, 0, sizeof(SPU_struct));
SPU_Reset();
return SPU_ChangeSoundCore(coreid, buffersize);