From d2c5206b1489770c37504426c6d7e9448287479e Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 5 Aug 2005 17:53:07 +0000 Subject: More sensible defaults Subversion-branch: /trunk/chocolate-doom Subversion-revision: 42 --- src/i_sound.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/i_sound.c b/src/i_sound.c index ce13778b..263f31d5 100644 --- a/src/i_sound.c +++ b/src/i_sound.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: i_sound.c 39 2005-08-04 21:48:32Z fraggle $ +// $Id: i_sound.c 42 2005-08-05 17:53:07Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -22,6 +22,9 @@ // 02111-1307, USA. // // $Log$ +// Revision 1.7 2005/08/05 17:53:07 fraggle +// More sensible defaults +// // Revision 1.6 2005/08/04 21:48:32 fraggle // Turn on compiler optimisation and warning options // Add SDL_mixer sound code @@ -48,7 +51,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: i_sound.c 39 2005-08-04 21:48:32Z fraggle $"; +rcsid[] = "$Id: i_sound.c 42 2005-08-05 17:53:07Z fraggle $"; #include #include @@ -78,7 +81,7 @@ static byte *expand_sound_data(byte *data, int samplerate, int length) if (samplerate == 11025) { - // need to expand to 2 channels, and expand 8 bit samples to 16 bits + // need to expand to 2 channels, and expand 11025->22050 result = Z_Malloc(length * 4, PU_STATIC, NULL); @@ -94,10 +97,9 @@ static byte *expand_sound_data(byte *data, int samplerate, int length) result = Z_Malloc(length * 2, PU_STATIC, NULL); - for (i=0; i