mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
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:
commit
aaba575856
|
@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#if !defined(PLATFORM_MACOSX) && !defined(PLATFORM_FREEBSD)
|
#ifdef PLATFORM_WIN32
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -38,12 +38,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include <search.h> // for qsort
|
#include <search.h> // for qsort
|
||||||
#include <float.h> // for FPU control
|
#include <float.h> // for FPU control
|
||||||
|
|
||||||
#if !defined(PLATFORM_MACOSX) && !defined(PLATFORM_FREEBSD)
|
|
||||||
#include <malloc.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* rcg10042001 !!! FIXME: Move these somewhere. */
|
/* rcg10042001 !!! FIXME: Move these somewhere. */
|
||||||
#if (defined PLATFORM_WIN32)
|
#if (defined PLATFORM_WIN32)
|
||||||
|
#include <malloc.h>
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
#include <crtdbg.h>
|
#include <crtdbg.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
|
|
@ -258,7 +258,7 @@ static BOOL StartUp_SDLaudio( CSoundLibrary &sl, BOOL bReport=TRUE)
|
||||||
}
|
}
|
||||||
|
|
||||||
sdl_silence = obtained.silence;
|
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 = (Uint8 *)AllocMemory(sdl_backbuffer_allocation);
|
||||||
sdl_backbuffer_remain = 0;
|
sdl_backbuffer_remain = 0;
|
||||||
sdl_backbuffer_pos = 0;
|
sdl_backbuffer_pos = 0;
|
||||||
|
|
|
@ -27,11 +27,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include <search.h> // for qsort
|
#include <search.h> // for qsort
|
||||||
#include <float.h> // for FPU control
|
#include <float.h> // for FPU control
|
||||||
|
|
||||||
#if !defined(PLATFORM_MACOSX) && !defined(PLATFORM_FREEBSD)
|
|
||||||
#include <malloc.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WIN32
|
#ifdef PLATFORM_WIN32
|
||||||
|
#include <malloc.h>
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
#include <crtdbg.h>
|
#include <crtdbg.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user