From 1350648d815dc26663706a1d29b2acd64d66c496 Mon Sep 17 00:00:00 2001 From: molivier Date: Wed, 22 Oct 2003 08:41:27 +0000 Subject: [PATCH] Factorized the code of the S_Play* functions git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3602 d7cf8633-e32d-0410-b094-e92efae38249 --- snd_dma.c | 69 ++++++++++++++++++------------------------------------- 1 file changed, 22 insertions(+), 47 deletions(-) diff --git a/snd_dma.c b/snd_dma.c index 4a98b3a5..1255ef36 100644 --- a/snd_dma.c +++ b/snd_dma.c @@ -275,10 +275,10 @@ sfx_t *S_GetCached (const char *name) if (!snd_initialized) return NULL; - + if (!name) Host_Error("S_IsCached: NULL\n"); - + if (strlen(name) >= MAX_QPATH) Host_Error("Sound name too long: %s", name); @@ -900,7 +900,7 @@ console functions =============================================================================== */ -void S_Play(void) +static void S_Play_Common(float fvol, float attenuation) { int i; char name[256]; @@ -910,62 +910,37 @@ void S_Play(void) while (i