+
+ if (bitmap->width != new_bitmap->width ||
+ bitmap->height != new_bitmap->height)
+ {
+ Error(ERR_WARN, "ReloadCustomImage: new image has wrong dimensions");
+ FreeBitmap(new_bitmap);
+ return;
+ }
+
+ TransferBitmapPointers(new_bitmap, bitmap);
+ free(new_bitmap);
+}
+
+
+/* ========================================================================= */
+/* audio functions */
+/* ========================================================================= */
+
+inline void OpenAudio(void)
+{
+ /* always start with reliable default values */
+ audio.sound_available = FALSE;
+ audio.music_available = FALSE;
+ audio.loops_available = FALSE;
+
+ audio.sound_enabled = FALSE;
+ audio.sound_deactivated = FALSE;
+
+ audio.soundserver_pipe[0] = audio.soundserver_pipe[1] = 0;
+ audio.soundserver_pid = -1;
+ audio.device_name = NULL;
+ audio.device_fd = 0;
+
+ audio.channels = 0;
+ audio.music_channel = 0;
+
+#if defined(TARGET_SDL)
+ SDLOpenAudio();