/***********************************************************
* Artsoft Retro-Game Library *
*----------------------------------------------------------*
-* (c) 1994-2000 Artsoft Entertainment *
+* (c) 1994-2001 Artsoft Entertainment *
* Holger Schemel *
* Detmolder Strasse 189 *
* 33604 Bielefeld *
void StartSoundserver(void)
{
+ if (!audio.sound_available)
+ return;
+
#if defined(PLATFORM_UNIX) && !defined(TARGET_SDL)
if (!ForkAudioProcess())
audio.sound_available = FALSE;
int i;
#endif
+ if (!audio.sound_available)
+ return FALSE;
+
num_sounds++;
Sound = checked_realloc(Sound, num_sounds * sizeof(struct SampleInfo));
int num_wav_music = 0;
int num_mod_music = 0;
+ if (!audio.sound_available)
+ return 0;
+
if ((dir = opendir(music_directory)) == NULL)
{
Error(ERR_WARN, "cannot read music directory '%s'", music_directory);
#if defined(TARGET_SDL)
if (audio.mods_available) /* play MOD music */
{
- Mix_VolumeMusic(SOUND_MAX_VOLUME);
Mix_PlayMusic(Mod[nr].mix_music, -1);
+ Mix_VolumeMusic(SOUND_MAX_VOLUME); /* must be _after_ Mix_PlayMusic()! */
}
else /* play WAV music loop */
{
void FadeMusic(void)
{
#if defined(TARGET_SDL)
+ if (!audio.sound_available)
+ return;
+
if (audio.mods_available)
Mix_FadeOutMusic(SOUND_FADING_INTERVAL);
else