From 011bda4743f481c7b085ded092f720c3765ae0a7 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 20 Jul 2006 04:29:54 +0000 Subject: [PATCH] changed SECONDARY_BUFFER_SIZE to be a multiple of 32768 so that it is roughly a power of 2... git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6517 d7cf8633-e32d-0410-b094-e92efae38249 --- snd_win.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snd_win.c b/snd_win.c index 1bed6c3d..502468a4 100644 --- a/snd_win.c +++ b/snd_win.c @@ -88,7 +88,9 @@ HRESULT (WINAPI *pDirectSoundCreate)(GUID FAR *lpGUID, LPDIRECTSOUND FAR *lplpDS static unsigned int wav_buffer_size; // DirectSound output: 64KB in 1 buffer -#define SECONDARY_BUFFER_SIZE(fmt_ptr) ((fmt_ptr)->width * (fmt_ptr)->channels * (fmt_ptr)->speed / 2) +//#define SECONDARY_BUFFER_SIZE(fmt_ptr) ((fmt_ptr)->width * (fmt_ptr)->channels * (fmt_ptr)->speed / 2) +// LordHavoc: changed this to be a multiple of 32768 +#define SECONDARY_BUFFER_SIZE(fmt_ptr) ((fmt_ptr)->channels * 32768) typedef enum sndinitstat_e {SIS_SUCCESS, SIS_FAILURE, SIS_NOTAVAIL} sndinitstat; -- 2.39.2