X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Fsound.c;h=c1334cc7bb05381cada4ab00d9b26452cb13964d;hb=1ceb7ce8723b32b267758bfda3bb7903fff8ea7a;hp=e230d9924f24349f51ab557d80100821a04814c3;hpb=51dcb2097c619c5f9ba924a7edb4a3bdd6a6986e;p=rocksndiamonds.git diff --git a/src/game_em/sound.c b/src/game_em/sound.c index e230d992..c1334cc7 100644 --- a/src/game_em/sound.c +++ b/src/game_em/sound.c @@ -20,9 +20,6 @@ #include #endif -#include "global.h" -#include "sample.h" - static char audioname[] = "/dev/audio"; static const int sound_priority[SAMPLE_MAX] = @@ -89,7 +86,7 @@ int sound_thread(void) mix_buffer = 0; mix_count = 0; - memset(sound_play, 0, sizeof(sound_play)); /* not playing any sounds */ + clear_mem(sound_play, sizeof(sound_play)); /* not playing any sounds */ for (;;) { @@ -97,7 +94,9 @@ int sound_thread(void) { /* pick sounds to play, if any */ - if (sound_play[SAMPLE_exit] || sound_play[SAMPLE_die]) + if (sound_play[SAMPLE_exit_open] || + sound_play[SAMPLE_exit_leave] || + sound_play[SAMPLE_die]) sound_play[SAMPLE_boom] = 0; /* no explosions if player goes home */ mix_count = 0; @@ -295,7 +294,7 @@ int sound_thread(void) if (mix_count && audio_fd != -1) { /* prepare mix buffer */ - memset(mix_buffer, 0, fragment_size * sizeof(*mix_buffer)); + clear_mem(mix_buffer, fragment_size * sizeof(*mix_buffer)); for (i = 0; i < mix_count; i++) {