commit 31f27c7a41f2aa2aac87052f85882a0eafbb1425
Author: Jonathan Dowland <jon+github@alcopop.org>
AuthorDate: Mon Jun 29 17:38:40 2015 +0100
Commit: Jonathan Dowland <jon+github@alcopop.org>
CommitDate: Wed Jul 1 07:37:04 2015 +0100
fix CacheSFX/WriteWAV debug procedure
Some debug code in CacheSFX is #ifdef'd out by default and hadn't
been updated to reflect more recent refactorings in the sound code.
---
src/i_sdlsound.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/i_sdlsound.c b/src/i_sdlsound.c
index ca8e6de0..b379c365 100644
--- a/src/i_sdlsound.c
+++ b/src/i_sdlsound.c
@@ -696,11 +696,12 @@ static boolean CacheSFX(sfxinfo_t *sfxinfo)
#ifdef DEBUG_DUMP_WAVS
{
char filename[16];
+ allocated_sound_t * snd;
M_snprintf(filename, sizeof(filename), "%s.wav",
- DEH_String(S_sfx[sound].name));
- WriteWAV(filename, sound_chunks[sound].abuf,
- sound_chunks[sound].alen, mixer_freq);
+ DEH_String(sfxinfo->name));
+ snd = GetAllocatedSoundBySfxInfoAndPitch(sfxinfo, NORM_PITCH);
+ WriteWAV(filename, snd->chunk.abuf, snd->chunk.alen,mixer_freq);
}
#endif