X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsound.c;h=f1a38d2c4cc69acbf26287d0eaaf5e83e2694ec8;hb=7ff43d7ba40390c41b10888aad0a35dfe3cad82a;hp=55a6c74bc079c2d78f9dc4639f7f6cf91a8867c5;hpb=20414a1c99e248151e43daf6ef5433e943afddd6;p=rocksndiamonds.git diff --git a/src/libgame/sound.c b/src/libgame/sound.c index 55a6c74b..f1a38d2c 100644 --- a/src/libgame/sound.c +++ b/src/libgame/sound.c @@ -662,7 +662,7 @@ static void SoundServer_InsertNewSound(struct SoundControl snd_ctrl) snd_info = (snd_ctrl.music ? Music[snd_ctrl.nr] : Sound[snd_ctrl.nr]); if (snd_info == NULL) { -#if 1 +#if 0 printf("sound/music %d undefined\n", snd_ctrl.nr); #endif return; @@ -1130,7 +1130,7 @@ static SoundInfo *Load_WAV(char *filename) if (!audio.sound_available) return NULL; -#if 1 +#if 0 printf("loading WAV file '%s'\n", filename); #endif @@ -1274,7 +1274,7 @@ static void replaceSoundEntry(SoundInfo **snd_info, char *filename) This usually means that this sound does not exist in this sound set and a fallback to the existing sound is done. */ -#if 1 +#if 0 printf("[sound '%s' already exists (same list entry)]\n", filename); #endif @@ -1287,7 +1287,7 @@ static void replaceSoundEntry(SoundInfo **snd_info, char *filename) /* check if the new sound file already exists in the list of sounds */ if ((node = getNodeFromKey(SoundFileList, filename)) != NULL) { -#if 1 +#if 0 printf("[sound '%s' already exists (other list entry)]\n", filename); #endif @@ -1305,7 +1305,7 @@ static void LoadCustomSound(SoundInfo **snd_info, char *basename) { char *filename = getCustomSoundFilename(basename); - if (strcmp(basename, "NONE") == 0) + if (strcmp(basename, SND_FILE_UNDEFINED) == 0) { deleteSoundEntry(snd_info); return; @@ -1334,13 +1334,17 @@ void LoadSoundToList(char *basename, int list_pos) if (Sound == NULL || list_pos >= num_sounds) return; +#if 0 printf("loading sound '%s' ... [%d]\n", basename, getNumNodes(SoundFileList)); +#endif LoadCustomSound(&Sound[list_pos], basename); +#if 0 printf("loading sound '%s' done [%d]\n", basename, getNumNodes(SoundFileList)); +#endif } static MusicInfo *Load_MOD(char *filename) @@ -1726,7 +1730,7 @@ static void ReloadCustomSounds() { int i; -#if 1 +#if 0 printf("DEBUG: reloading sounds '%s' ...\n", artwork.sounds_set_current); #endif @@ -1743,12 +1747,15 @@ static void ReloadCustomSounds() /* printf("list size == %d\n", getNumNodes(SoundFileList)); */ + +#if 0 dumpList(SoundFileList); +#endif } static void ReloadCustomMusic() { -#if 1 +#if 0 printf("DEBUG: reloading music '%s' ...\n", artwork.music_set_current); #endif