Merge pull request #25 from DanielGibson/no-malloc-h-soundfix

Only use <malloc.h> on Win32; increase SDL sound buffer
This commit is contained in:
Ryan C. Gordon 2016-04-16 19:38:58 -04:00
commit aaba575856
4 changed files with 4 additions and 10 deletions

View File

@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <stdarg.h>
#include <math.h>
#if !defined(PLATFORM_MACOSX) && !defined(PLATFORM_FREEBSD)
#ifdef PLATFORM_WIN32
#include <malloc.h>
#endif

View File

@ -38,12 +38,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <search.h> // for qsort
#include <float.h> // for FPU control
#if !defined(PLATFORM_MACOSX) && !defined(PLATFORM_FREEBSD)
#include <malloc.h>
#endif
/* rcg10042001 !!! FIXME: Move these somewhere. */
#if (defined PLATFORM_WIN32)
#include <malloc.h>
#include <conio.h>
#include <crtdbg.h>
#include <winsock2.h>

View File

@ -258,7 +258,7 @@ static BOOL StartUp_SDLaudio( CSoundLibrary &sl, BOOL bReport=TRUE)
}
sdl_silence = obtained.silence;
sdl_backbuffer_allocation = (obtained.size * 2);
sdl_backbuffer_allocation = (obtained.size * 4);
sdl_backbuffer = (Uint8 *)AllocMemory(sdl_backbuffer_allocation);
sdl_backbuffer_remain = 0;
sdl_backbuffer_pos = 0;

View File

@ -27,11 +27,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <search.h> // for qsort
#include <float.h> // for FPU control
#if !defined(PLATFORM_MACOSX) && !defined(PLATFORM_FREEBSD)
#include <malloc.h>
#endif
#ifdef PLATFORM_WIN32
#include <malloc.h>
#include <conio.h>
#include <crtdbg.h>
#include <winsock2.h>