X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsound.c;h=cd34b284473e3126a0191fc3074f7005793fd0e0;hb=c9433eab5c4317ed4f89164b386a7d33562e29be;hp=ae4028d74589bd98e6d41f6eb32155f9d8263f71;hpb=b81f28710057e7d84528b65b92e9b4d1aaadab6c;p=rocksndiamonds.git diff --git a/src/libgame/sound.c b/src/libgame/sound.c index ae4028d7..cd34b284 100644 --- a/src/libgame/sound.c +++ b/src/libgame/sound.c @@ -1,7 +1,7 @@ /*********************************************************** * Artsoft Retro-Game Library * *----------------------------------------------------------* -* (c) 1994-2001 Artsoft Entertainment * +* (c) 1994-2002 Artsoft Entertainment * * Holger Schemel * * Detmolder Strasse 189 * * 33604 Bielefeld * @@ -11,8 +11,9 @@ * sound.c * ***********************************************************/ -#include +#include #include +#include #include #include #include @@ -810,7 +811,12 @@ static void Mixer_InsertSound(SoundControl snd_ctrl) #endif if (IS_MUSIC(snd_ctrl)) + { + if (num_music == 0) + return; + snd_ctrl.nr = snd_ctrl.nr % num_music; + } else if (snd_ctrl.nr >= num_sounds) return; @@ -1299,7 +1305,7 @@ static int Mixer_Main_SimpleAudio(SoundControl snd_ctrl) mixer[i].volume * (long)premix_first_buffer[j] / SOUND_MAX_VOLUME; /* might be needed for u-law /dev/audio */ -#if 0 +#if 1 for(j=0; j