From 7f37260a9c0c3c4a1e604f31a09dbde2c5d2346b Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 28 Feb 2003 16:22:42 +0000 Subject: [PATCH] this bit shouldn't know about windows --- libs/audio/renderer/snd_dma.c | 19 ---------------- libs/audio/renderer/snd_mix.c | 43 ++--------------------------------- 2 files changed, 2 insertions(+), 60 deletions(-) diff --git a/libs/audio/renderer/snd_dma.c b/libs/audio/renderer/snd_dma.c index 578bc6f6a..ba82ac073 100644 --- a/libs/audio/renderer/snd_dma.c +++ b/libs/audio/renderer/snd_dma.c @@ -427,12 +427,7 @@ SND_ClearBuffer (void) int i; -//#ifdef _WIN32 -// if (!sound_started || !shm || (!shm->buffer && !pDSBuf)) -//#endif - if (!sound_started || !shm || !shm->buffer) -//#endif return; if (shm->samplebits == 8) @@ -440,13 +435,6 @@ SND_ClearBuffer (void) else clear = 0; -#if 0 -#ifdef _WIN32 - if (pDSBuf) - DSOUND_ClearBuffer (clear); - else -#endif -#endif for (i = 0; i < shm->samples * shm->samplebits / 8; i++) shm->buffer[i] = 0; } @@ -592,13 +580,6 @@ SND_Update_ (void) if (endtime - soundtime > samps) endtime = soundtime + samps; -#if 0 -#ifdef _WIN32 - if (pDSBuf) - DSOUND_Restore (); -#endif -#endif - SND_PaintChannels (endtime); snd_output_funcs->pS_O_Submit (); } diff --git a/libs/audio/renderer/snd_mix.c b/libs/audio/renderer/snd_mix.c index f5d390e12..3cdd01351 100644 --- a/libs/audio/renderer/snd_mix.c +++ b/libs/audio/renderer/snd_mix.c @@ -93,20 +93,7 @@ SND_TransferStereo16 (int endtime) lpaintedtime = paintedtime; -#if 0 -#ifdef _WIN32 - if (pDSBuf) { - pbuf = DSOUND_LockBuffer (true); - if (!pbuf) { - Sys_Printf ("DSOUND_LockBuffer fails!\n"); - return; - } - } else -#endif -#endif - { - pbuf = (unsigned long *) shm->buffer; - } + pbuf = (unsigned long *) shm->buffer; while (lpaintedtime < endtime) { // handle recirculating buffer issues @@ -126,13 +113,6 @@ SND_TransferStereo16 (int endtime) snd_p += snd_linear_count; lpaintedtime += (snd_linear_count >> 1); } - -#if 0 -#ifdef _WIN32 - if (pDSBuf) - DSOUND_LockBuffer (false); -#endif -#endif } static void @@ -154,20 +134,7 @@ SND_TransferPaintBuffer (int endtime) step = 3 - shm->channels; snd_vol = volume->value * 256; -#if 0 -#ifdef _WIN32 - if (pDSBuf) { - pbuf = DSOUND_LockBuffer (true); - if (!pbuf) { - Sys_Printf ("DSOUND_LockBuffer fails!\n"); - return; - } - } else -#endif -#endif - { - pbuf = (unsigned long *) shm->buffer; - } + pbuf = (unsigned long *) shm->buffer; if (shm->samplebits == 16) { short *out = (short *) pbuf; @@ -196,12 +163,6 @@ SND_TransferPaintBuffer (int endtime) out_idx = (out_idx + 1) & out_mask; } } -#if 0 -#ifdef _WIN32 - if (pDSBuf) - DSOUND_LockBuffer (false); -#endif -#endif } /* CHANNEL MIXING */