From 496a9e8b3489a0a85fd47b91d1f587255845c31e Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 19 Apr 2008 15:30:42 +0000 Subject: Fix some more warnings. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1121 --- src/i_main.c | 2 +- src/i_sdlsound.c | 70 ++++++++++++++++++++++++++++---------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/i_main.c b/src/i_main.c index b95ecf40..748a72be 100644 --- a/src/i_main.c +++ b/src/i_main.c @@ -54,7 +54,7 @@ int main(int argc, char **argv) if (!SetProcessAffinityMask(GetCurrentProcess(), 1)) { fprintf(stderr, "Failed to set process affinity mask (%d)\n", - GetLastError()); + (int) GetLastError()); } #endif diff --git a/src/i_sdlsound.c b/src/i_sdlsound.c index 5a7de5bb..6f756987 100644 --- a/src/i_sdlsound.c +++ b/src/i_sdlsound.c @@ -216,6 +216,41 @@ static uint32_t ExpandSoundData_SRC(byte *data, return clipped; } +// Preload all the sound effects - stops nasty ingame freezes + +static void I_PrecacheSounds(void) +{ + char namebuf[9]; + int i; + + printf("I_PrecacheSounds: Precaching all sound effects.."); + + for (i=sfx_pistol; i