Module darkplaces: Change committed

havoc at icculus.org havoc at icculus.org
Sun Jul 7 20:02:13 EDT 2002


Commiter   : havoc
CVSROOT    : /cvs/cvsroot/twilight
Module     : darkplaces
Commit time: 2002-07-08 00:02:13 UTC

Log message:

added snd_null for anyone who can't use the other sound drivers, and cleaned up the notes regarding sound drivers in the makefile

Modified files:
     makefile

Added files:
     snd_null.c

------=MIME.3bbdca1267852adbf44e8936c409c9c8
Content-Type: text/plain; name="darkplaces.20020708.000213.havoc.diff"
Content-Disposition: attachment; filename="darkplaces.20020708.000213.havoc.diff"
Content-Transfer-Encoding: 8bit

Index: darkplaces/makefile
diff -u darkplaces/makefile:1.46 darkplaces/makefile:1.47
--- darkplaces/makefile:1.46	Sun Jul  7 19:42:36 2002
+++ darkplaces/makefile	Sun Jul  7 20:02:03 2002
@@ -1,13 +1,20 @@
-#uncomment one of these according to your sound driver
-#if you use ALSA version 0.9.x
-#SND=snd_alsa_0_9.o
+
+
+#uncomment these according to your sound driver
+
+#recommended for: anyone not using ALSA 0.5
+SND=snd_oss.o snd_dma.o snd_mix.o snd_mem.o
+SOUNDLIB=
+#recommended for: anyone using ALSA 0.5
+#SND=snd_alsa_0_5.o snd_dma.o snd_mix.o snd_mem.o
 #SOUNDLIB=-lasound
-#if you use ALSA version 0.5.x
-#SND=snd_alsa_0_5.o
+#recommended for: no one (this driver needs to be updated, it doesn't compile anymore)
+#SND=snd_alsa_0_9.o snd_dma.o snd_mix.o snd_mem.o
 #SOUNDLIB=-lasound
-#if you use the kernel sound driver or OSS
-SND=snd_oss.o
-SOUNDLIB=
+#recommended for: anyone who can't use the above drivers
+#SND=snd_null.o
+#SOUNDLIB=
+
 
 #uncomment your preference
 #if you want CD sound in Linux
@@ -15,7 +22,7 @@
 #if you want no CD audio
 CD=cd_null.o
 
-OBJECTS= builddate.o $(CD) chase.o cl_demo.o cl_input.o cl_main.o cl_parse.o cl_tent.o cmd.o common.o console.o crc.o cvar.o fractalnoise.o gl_draw.o r_sky.o gl_rmain.o gl_rsurf.o host.o host_cmd.o image.o keys.o mathlib.o menu.o model_alias.o model_brush.o model_shared.o model_sprite.o net_bsd.o net_udp.o net_dgrm.o net_loop.o net_main.o pr_cmds.o pr_edict.o pr_exec.o r_light.o r_explosion.o sbar.o snd_dma.o snd_mem.o snd_mix.o $(SND) sv_main.o sv_move.o sv_phys.o sv_user.o sv_light.o sys_linux.o transform.o view.o wad.o world.o zone.o vid_shared.o palette.o r_crosshairs.o gl_textures.o gl_models.o r_sprites.o r_modules.o r_explosion.o r_lerpanim.o protocol.o quakeio.o r_clip.o ui.o portals.o sys_shared.o cl_light.o gl_backend.o cl_particles.o cl_screen.o cgamevm.o cgame.o filematch.o collision.o cl_collision.o matrix4x4.o matrix3x4.o
+OBJECTS= builddate.o $(CD) $(SND) chase.o cl_demo.o cl_input.o cl_main.o cl_parse.o cl_tent.o cmd.o common.o console.o crc.o cvar.o fractalnoise.o gl_draw.o r_sky.o gl_rmain.o gl_rsurf.o host.o host_cmd.o image.o keys.o mathlib.o menu.o model_alias.o model_brush.o model_shared.o model_sprite.o net_bsd.o net_udp.o net_dgrm.o net_loop.o net_main.o pr_cmds.o pr_edict.o pr_exec.o r_light.o r_explosion.o sbar.o sv_main.o sv_move.o sv_phys.o sv_user.o sv_light.o sys_linux.o transform.o view.o wad.o world.o zone.o vid_shared.o palette.o r_crosshairs.o gl_textures.o gl_models.o r_sprites.o r_modules.o r_explosion.o r_lerpanim.o protocol.o quakeio.o r_clip.o ui.o portals.o sys_shared.o cl_light.o gl_backend.o cl_particles.o cl_screen.o cgamevm.o cgame.o filematch.o collision.o cl_collision.o matrix4x4.o matrix3x4.o
 
 #K6/athlon optimizations
 CPUOPTIMIZATIONS=-march=k6
Index: darkplaces/snd_null.c
diff -u /dev/null darkplaces/snd_null.c:1.1
--- /dev/null	Sun Jul  7 20:02:13 2002
+++ darkplaces/snd_null.c	Sun Jul  7 20:02:03 2002
@@ -0,0 +1,100 @@
+/*
+Copyright (C) 1996-1997 Id Software, Inc.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+// snd_null.c -- include this instead of all the other snd_* files to have
+// no sound code whatsoever
+
+#include "quakedef.h"
+
+cvar_t bgmvolume = {CVAR_SAVE, "bgmvolume", "1"};
+cvar_t volume = {CVAR_SAVE, "volume", "0.7"};
+
+qboolean snd_initialized = false;
+
+void S_Init (void)
+{
+	Cvar_RegisterVariable(&bgmvolume);
+	Cvar_RegisterVariable(&volume);
+}
+
+void S_AmbientOff (void)
+{
+}
+
+void S_AmbientOn (void)
+{
+}
+
+void S_Shutdown (void)
+{
+}
+
+void S_TouchSound (char *sample)
+{
+}
+
+void S_ClearBuffer (void)
+{
+}
+
+void S_StaticSound (sfx_t *sfx, vec3_t origin, float vol, float attenuation)
+{
+}
+
+void S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol,  float attenuation)
+{
+}
+
+void S_StopSound (int entnum, int entchannel)
+{
+}
+
+sfx_t *S_PrecacheSound (char *sample, int complain)
+{
+	return NULL;
+}
+
+void S_ClearPrecache (void)
+{
+}
+
+void S_Update (vec3_t origin, vec3_t v_forward, vec3_t v_right, vec3_t v_up)
+{
+}
+
+void S_StopAllSounds (qboolean clear)
+{
+}
+
+void S_BeginPrecaching (void)
+{
+}
+
+void S_EndPrecaching (void)
+{
+}
+
+void S_ExtraUpdate (void)
+{
+}
+
+void S_LocalSound (char *s)
+{
+}
+


More information about the twilight-commits mailing list