diff --git a/engine/client/snd_mem.c b/engine/client/snd_mem.c index 00e7fdc4b..4a4fcdee7 100644 --- a/engine/client/snd_mem.c +++ b/engine/client/snd_mem.c @@ -202,6 +202,7 @@ void ResampleSfx (sfx_t *sfx, int inrate, int inwidth, qbyte *data) } //============================================================================= +#ifdef DOOMWADS // needs fine tuning.. educated guesses #define DSPK_RATE 128 #define DSPK_FREQ 31 @@ -318,6 +319,7 @@ sfxcache_t *S_LoadDoomSound (sfx_t *s, qbyte *data, int datalen, int sndspeed) return sc; } +#endif sfxcache_t *S_LoadWavSound (sfx_t *s, qbyte *data, int datalen, int sndspeed) { @@ -360,8 +362,10 @@ S_LoadSound_t AudioInputPlugins[10] = S_LoadOVSound, #endif S_LoadWavSound, +#ifdef DOOMWADS S_LoadDoomSound, S_LoadDoomSpeakerSound, +#endif }; qboolean S_RegisterSoundInputPlugin(S_LoadSound_t loadfnc) diff --git a/engine/client/snd_mix.c b/engine/client/snd_mix.c index f0f385d01..c3e922533 100644 --- a/engine/client/snd_mix.c +++ b/engine/client/snd_mix.c @@ -315,11 +315,11 @@ void S_TransferPaintBuffer(soundcardinfo_t *sc, int endtime) p = (int *) paintbuffer; count = (endtime - sc->paintedtime) * sc->sn.numchannels; out_mask = sc->sn.samples - 1; - out_idx = sc->paintedtime * sc->sn.numchannels & out_mask; + out_idx = (sc->paintedtime * sc->sn.numchannels) & out_mask; if (sc->sn.numchannels>2) step = 1; else - step = 3 - sc->sn.numchannels; + step = 6; snd_vol = volume.value*256; pbuf = sc->Lock(sc);