From dd39af700d1d726e96b386b07a29e09cb2c9825a Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 19 Aug 2005 21:55:51 +0000 Subject: Make sounds louder. Use the correct maximum of 15 when doing sound calculations. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 53 --- src/i_sound.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/i_sound.c b/src/i_sound.c index 0ab1267c..52294b2d 100644 --- a/src/i_sound.c +++ b/src/i_sound.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: i_sound.c 48 2005-08-07 19:21:01Z fraggle $ +// $Id: i_sound.c 53 2005-08-19 21:55:51Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -22,6 +22,10 @@ // 02111-1307, USA. // // $Log$ +// Revision 1.10 2005/08/19 21:55:51 fraggle +// Make sounds louder. Use the correct maximum of 15 when doing sound +// calculations. +// // Revision 1.9 2005/08/07 19:21:01 fraggle // Cycle round sound channels to stop reuse and conflicts of channel // numbers. Add debug to detect when incorrect sound handles are used. @@ -59,7 +63,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: i_sound.c 48 2005-08-07 19:21:01Z fraggle $"; +rcsid[] = "$Id: i_sound.c 53 2005-08-19 21:55:51Z fraggle $"; #include #include @@ -141,7 +145,7 @@ static Mix_Chunk *getsfx(int sound) sound_chunks[sound].allocated = 1; sound_chunks[sound].abuf = expand_sound_data(data + 8, samplerate, length); sound_chunks[sound].alen = (length * 2) * (22050 / samplerate); - sound_chunks[sound].volume = 32; + sound_chunks[sound].volume = 64; } return &sound_chunks[sound]; @@ -322,6 +326,7 @@ I_UpdateSoundParams int pitch) { int tag = handle >> 8; + int left, right; handle &= 0xff; @@ -330,10 +335,11 @@ I_UpdateSoundParams fprintf(stderr, "tag is wrong for playing sound: %i, %i\n", tag, handle); } - - Mix_SetPanning(handle, - ((254 - sep) * vol) / 8, - ((sep) * vol) / 8); + + left = ((254 - sep) * vol) / 15; + right = ((sep) * vol) / 15; + + Mix_SetPanning(handle, left, right); } -- cgit v1.2.3