-#if defined(TARGET_SDL)
-
- if (state & SND_CTRL_FADE)
- {
- int i;
-
- /*
- for (i=audio.first_sound_channel; i<audio.num_channels; i++)
- */
-
- for (i=0; i<audio.channels; i++)
- if (i != audio.music_channel || snd_ctrl.music)
- Mix_FadeOutChannel(i, SOUND_FADING_INTERVAL);
- if (state & SND_CTRL_MUSIC)
- Mix_FadeOutMusic(SOUND_FADING_INTERVAL);
- }
- else
- {
- int i;
-
- for (i=0; i<audio.channels; i++)
- if (i != audio.music_channel || snd_ctrl.music)
- Mix_HaltChannel(i);
- if (state & SND_CTRL_MUSIC)
- Mix_HaltMusic();
- }
-
-#elif !defined(PLATFORM_MSDOS)
-
- if (audio.mixer_pid == 0) /* we are child process */
- return;
-
- if (write(audio.mixer_pipe[1], &snd_ctrl, sizeof(snd_ctrl)) < 0)
- {
- Error(ERR_WARN, "cannot pipe to child process -- no sounds");
- audio.sound_available = audio.sound_enabled = FALSE;
- return;
- }
-#else /* PLATFORM_MSDOS */
- sound_handler(snd_ctrl);
-#endif