commit 00b50443326b087a2a947d7aa00b868856555130
Author: Simon Howard <fraggle@gmail.com>
AuthorDate: Sat Mar 18 23:19:14 2006 +0000
Commit: Simon Howard <fraggle@gmail.com>
CommitDate: Sat Mar 18 23:19:14 2006 +0000
Catch failures to initialise SDL_mixer properly, and fail gracefully
rather than crashing the game.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 425
---
src/i_sound.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/i_sound.c b/src/i_sound.c
index 0935c95c..937e78da 100644
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: i_sound.c 338 2006-01-23 01:40:24Z fraggle $
+// $Id: i_sound.c 425 2006-03-18 23:19:14Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -128,7 +128,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: i_sound.c 338 2006-01-23 01:40:24Z fraggle $";
+rcsid[] = "$Id: i_sound.c 425 2006-03-18 23:19:14Z fraggle $";
#include <stdio.h>
#include <stdlib.h>
@@ -552,6 +552,7 @@ I_InitSound()
if (Mix_OpenAudio(22050, AUDIO_S16LSB, 2, 1024) < 0)
{
fprintf(stderr, "Error initialising SDL_mixer: %s\n", SDL_GetError());
+ return;
}
Mix_AllocateChannels(NUM_CHANNELS);