projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20070918-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
sound.c
diff --git
a/src/libgame/sound.c
b/src/libgame/sound.c
index c10575b8660625bd4182b62fccaee55a309c3481..b80cccab57ca3636078e1d8af1e23fb376d2f97e 100644
(file)
--- a/
src/libgame/sound.c
+++ b/
src/libgame/sound.c
@@
-483,7
+483,7
@@
static void WriteReloadInfoToPipe(char *set_identifier, int type)
if (leveldir_current == NULL) /* should never happen */
Error(ERR_EXIT, "leveldir_current == NULL");
if (leveldir_current == NULL) /* should never happen */
Error(ERR_EXIT, "leveldir_current == NULL");
-
memset(&snd_ctrl, 0
, sizeof(SoundControl)); /* to make valgrind happy */
+
clear_mem(&snd_ctrl
, sizeof(SoundControl)); /* to make valgrind happy */
snd_ctrl.active = FALSE;
snd_ctrl.state = type;
snd_ctrl.active = FALSE;
snd_ctrl.state = type;
@@
-1147,8
+1147,8
@@
static void Mixer_Main_DSP()
max_sample_size = fragment_size / (num_output_channels * sample_bytes);
/* first clear the last premixing buffer */
max_sample_size = fragment_size / (num_output_channels * sample_bytes);
/* first clear the last premixing buffer */
-
memset(premix_last_buffer, 0
,
- max_sample_size * num_output_channels * sizeof(long));
+
clear_mem(premix_last_buffer
,
+
max_sample_size * num_output_channels * sizeof(long));
for (i = 0; i < audio.num_channels; i++)
{
for (i = 0; i < audio.num_channels; i++)
{
@@
-1559,6
+1559,8
@@
static void *Load_WAV(char *filename)
#else /* AUDIO_UNIX_NATIVE */
#else /* AUDIO_UNIX_NATIVE */
+ clear_mem(&header, sizeof(struct SoundHeader_WAV)); /* to make gcc happy */
+
if ((file = fopen(filename, MODE_READ)) == NULL)
{
Error(ERR_WARN, "cannot open sound file '%s'", filename);
if ((file = fopen(filename, MODE_READ)) == NULL)
{
Error(ERR_WARN, "cannot open sound file '%s'", filename);
@@
-2171,7
+2173,7
@@
void StopSoundExt(int nr, int state)
if (!audio.sound_available)
return;
if (!audio.sound_available)
return;
-
memset(&snd_ctrl, 0
, sizeof(SoundControl)); /* to make valgrind happy */
+
clear_mem(&snd_ctrl
, sizeof(SoundControl)); /* to make valgrind happy */
snd_ctrl.active = FALSE;
snd_ctrl.nr = nr;
snd_ctrl.active = FALSE;
snd_ctrl.nr = nr;