summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2005-09-06 21:40:28 +0000
committerSimon Howard2005-09-06 21:40:28 +0000
commit7bf9829dbc35be88a7ff95a09ec7ea4f72b76a48 (patch)
tree75bc687fb729881c85c11b076017854219567866 /src
parent49cdaa04c2ecc626650bfb3826242234e138b1ea (diff)
downloadchocolate-doom-7bf9829dbc35be88a7ff95a09ec7ea4f72b76a48.tar.gz
chocolate-doom-7bf9829dbc35be88a7ff95a09ec7ea4f72b76a48.tar.bz2
chocolate-doom-7bf9829dbc35be88a7ff95a09ec7ea4f72b76a48.zip
Setting music volume
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 79
Diffstat (limited to 'src')
-rw-r--r--src/i_sound.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/i_sound.c b/src/i_sound.c
index d1c58f15..a2cbf9c5 100644
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: i_sound.c 77 2005-09-06 21:11:23Z fraggle $
+// $Id: i_sound.c 79 2005-09-06 21:40:28Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.15 2005/09/06 21:40:28 fraggle
+// Setting music volume
+//
// Revision 1.14 2005/09/06 21:11:23 fraggle
// Working music!
//
@@ -77,7 +80,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: i_sound.c 77 2005-09-06 21:11:23Z fraggle $";
+rcsid[] = "$Id: i_sound.c 79 2005-09-06 21:40:28Z fraggle $";
#include <stdio.h>
#include <stdlib.h>
@@ -196,21 +199,21 @@ void I_SetChannels()
void I_SetSfxVolume(int volume)
{
- // Identical to DOS.
- // Basically, this should propagate
- // the menu/config file setting
- // to the state variable used in
- // the mixing.
- snd_SfxVolume = volume;
+ // Identical to DOS.
+ // Basically, this should propagate
+ // the menu/config file setting
+ // to the state variable used in
+ // the mixing.
+ snd_SfxVolume = volume;
}
// MUSIC API - dummy. Some code from DOS version.
void I_SetMusicVolume(int volume)
{
- // Internal state variable.
- snd_MusicVolume = volume;
- // Now set volume on output device.
- // Whatever( snd_MusciVolume );
+ // Internal state variable.
+ snd_MusicVolume = volume;
+
+ Mix_VolumeMusic((volume * MIX_MAX_VOLUME) / 15);
}