diff options
author | Simon Howard | 2005-08-19 21:55:51 +0000 |
---|---|---|
committer | Simon Howard | 2005-08-19 21:55:51 +0000 |
commit | dd39af700d1d726e96b386b07a29e09cb2c9825a (patch) | |
tree | fe3b90d08d0e5204622c98d84bcfac5453d7e900 | |
parent | 48b1f583ff25013b862fa9b63e41da2449700c8b (diff) | |
download | chocolate-doom-dd39af700d1d726e96b386b07a29e09cb2c9825a.tar.gz chocolate-doom-dd39af700d1d726e96b386b07a29e09cb2c9825a.tar.bz2 chocolate-doom-dd39af700d1d726e96b386b07a29e09cb2c9825a.zip |
Make sounds louder. Use the correct maximum of 15 when doing sound
calculations.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 53
-rw-r--r-- | src/i_sound.c | 20 |
1 files 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 <stdio.h> #include <stdlib.h> @@ -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); } |