diff options
author | Simon Howard | 2008-04-19 15:30:42 +0000 |
---|---|---|
committer | Simon Howard | 2008-04-19 15:30:42 +0000 |
commit | 496a9e8b3489a0a85fd47b91d1f587255845c31e (patch) | |
tree | 3ca862912c3211eafa30e752f4f6798b770d5e36 /src | |
parent | 226cf56d65e7f8a57bf78a7503d420eef09e8568 (diff) | |
download | chocolate-doom-496a9e8b3489a0a85fd47b91d1f587255845c31e.tar.gz chocolate-doom-496a9e8b3489a0a85fd47b91d1f587255845c31e.tar.bz2 chocolate-doom-496a9e8b3489a0a85fd47b91d1f587255845c31e.zip |
Fix some more warnings.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1121
Diffstat (limited to 'src')
-rw-r--r-- | src/i_main.c | 2 | ||||
-rw-r--r-- | src/i_sdlsound.c | 70 |
2 files changed, 36 insertions, 36 deletions
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<NUMSFX; ++i) + { + if ((i % 6) == 0) + { + printf("."); + fflush(stdout); + } + + sprintf(namebuf, "ds%s", DEH_String(S_sfx[i].name)); + + S_sfx[i].lumpnum = W_CheckNumForName(namebuf); + + if (S_sfx[i].lumpnum != -1) + { + CacheSFX(i); + + if (sound_chunks[i].abuf != NULL) + { + Z_ChangeTag(sound_chunks[i].abuf, PU_CACHE); + } + } + } + + printf("\n"); +} + #endif static boolean ConvertibleRatio(int freq1, int freq2) @@ -574,41 +609,6 @@ static void I_SDL_ShutdownSound(void) } -// 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<NUMSFX; ++i) - { - if ((i % 6) == 0) - { - printf("."); - fflush(stdout); - } - - sprintf(namebuf, "ds%s", DEH_String(S_sfx[i].name)); - - S_sfx[i].lumpnum = W_CheckNumForName(namebuf); - - if (S_sfx[i].lumpnum != -1) - { - CacheSFX(i); - - if (sound_chunks[i].abuf != NULL) - { - Z_ChangeTag(sound_chunks[i].abuf, PU_CACHE); - } - } - } - - printf("\n"); -} - static boolean I_SDL_InitSound(void) { int i; |