X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fsound.c;h=fc187139f9164b83e0ff4ab2d4c6e8f89624560d;hp=c10575b8660625bd4182b62fccaee55a309c3481;hb=6b9be0de63f8e031e8400b829fd2dc9b125bb0b4;hpb=6d06ba238902736bb99714dc8122bb32a286577a diff --git a/src/libgame/sound.c b/src/libgame/sound.c index c10575b8..fc187139 100644 --- 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"); - 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; @@ -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 */ - 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++) { @@ -2171,7 +2171,7 @@ void StopSoundExt(int nr, int state) 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;