added cropping text area gadgets that do not fit to the current viewport
[rocksndiamonds.git] / src / libgame / sound.c
index 12b01c382b8f1c50cd62403b9ce65317fa9e8840..3d085a9dbe8f8f336d241978616723cbcb8ec465 100644 (file)
@@ -166,8 +166,8 @@ static boolean Mixer_ChannelExpired(int channel)
 
   if (expire_loop_sounds &&
       IS_LOOP(mixer[channel]) && !IS_MUSIC(mixer[channel]) &&
-      DelayReached(&mixer[channel].playing_starttime,
-                  SOUND_LOOP_EXPIRATION_TIME))
+      DelayReachedExt2(&mixer[channel].playing_starttime,
+                      SOUND_LOOP_EXPIRATION_TIME, Counter()))
     return TRUE;
 
   if (!Mix_Playing(channel))
@@ -591,7 +591,7 @@ static void LoadCustomMusic_NoConf(void)
 {
   static boolean draw_init_text = TRUE;                // only draw at startup
   static char *last_music_directory = NULL;
-  char *music_directory = getCustomMusicDirectory();
+  char *music_directory = getCustomMusicDirectory_NoConf();
   Directory *dir;
   DirectoryEntry *dir_entry;
   int num_music = getMusicListSize();
@@ -741,6 +741,16 @@ static MusicInfo *getMusicInfoEntryFromMusicID(int pos)
   return mus_info[list_pos];
 }
 
+char *getSoundInfoEntryFilename(int pos)
+{
+  SoundInfo *snd_info = getSoundInfoEntryFromSoundID(pos);
+
+  if (snd_info == NULL)
+    return NULL;
+
+  return getBaseNamePtr(snd_info->source_filename);
+}
+
 char *getMusicInfoEntryFilename(int pos)
 {
   MusicInfo *mus_info = getMusicInfoEntryFromMusicID(pos);
@@ -1103,7 +1113,7 @@ static void ReloadCustomMusic(void)
   LoadCustomMusic_NoConf();
 }
 
-void InitReloadCustomSounds(char *set_identifier)
+void InitReloadCustomSounds(void)
 {
   if (!audio.sound_available)
     return;
@@ -1111,7 +1121,7 @@ void InitReloadCustomSounds(char *set_identifier)
   ReloadCustomSounds();
 }
 
-void InitReloadCustomMusic(char *set_identifier)
+void InitReloadCustomMusic(void)
 {
   if (!audio.music_available)
     return;