diff options
author | Simon Howard | 2008-09-08 17:53:36 +0000 |
---|---|---|
committer | Simon Howard | 2008-09-08 17:53:36 +0000 |
commit | 0a5d1795ce8fe46e20627f8a7b4ba348f2ec400e (patch) | |
tree | 822238d6db25143d1695ee40246966b86bd16bc3 | |
parent | 2b2abd2561d40154a61f332bfd89edf3f21a87c5 (diff) | |
download | chocolate-doom-0a5d1795ce8fe46e20627f8a7b4ba348f2ec400e.tar.gz chocolate-doom-0a5d1795ce8fe46e20627f8a7b4ba348f2ec400e.tar.bz2 chocolate-doom-0a5d1795ce8fe46e20627f8a7b4ba348f2ec400e.zip |
Fix disabled PC speaker sounds.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1215
-rw-r--r-- | src/i_pcsound.c | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/src/i_pcsound.c b/src/i_pcsound.c index 500deb99..7ea545c4 100644 --- a/src/i_pcsound.c +++ b/src/i_pcsound.c @@ -142,6 +142,33 @@ static boolean CachePCSLump(sfxinfo_t *sfxinfo) return true; } +// These Doom PC speaker sounds are not played - this can be seen in the +// Heretic source code, where there are remnants of this left over +// from Doom. + +static boolean IsDisabledSound(sfxinfo_t *sfxinfo) +{ + int i; + const char *disabled_sounds[] = { + "posact", + "bgact", + "dmact", + "dmpain", + "popain", + "sawidl", + }; + + for (i=0; i<arrlen(disabled_sounds); ++i) + { + if (!strcmp(sfxinfo->name, disabled_sounds[i])) + { + return true; + } + } + + return false; +} + static int I_PCS_StartSound(sfxinfo_t *sfxinfo, int channel, int vol, @@ -154,17 +181,10 @@ static int I_PCS_StartSound(sfxinfo_t *sfxinfo, return -1; } -/* TODO - // These PC speaker sounds are not played - this can be seen in the - // Heretic source code, where there are remnants of this left over - // from Doom. - - if (id == sfx_posact || id == sfx_bgact || id == sfx_dmact - || id == sfx_dmpain || id == sfx_popain || id == sfx_sawidl) + if (IsDisabledSound(sfxinfo)) { return -1; } - */ if (SDL_LockMutex(sound_lock) < 0) { |