summaryrefslogtreecommitdiff
path: root/src/setup/sound.c
diff options
context:
space:
mode:
authorSimon Howard2010-04-30 20:53:31 +0000
committerSimon Howard2010-04-30 20:53:31 +0000
commit1162b2c65c5bcff51e2d13aa2cfc2051529cfe68 (patch)
treef87e1751ec53be3322d6f0caf2ee6ab34132b7cc /src/setup/sound.c
parent63ff4879e6c7811d9e8cf357b4e44701964adf21 (diff)
parentf151517ba6b7e7caf7b49e8ceafbf0969959e068 (diff)
downloadchocolate-doom-1162b2c65c5bcff51e2d13aa2cfc2051529cfe68.tar.gz
chocolate-doom-1162b2c65c5bcff51e2d13aa2cfc2051529cfe68.tar.bz2
chocolate-doom-1162b2c65c5bcff51e2d13aa2cfc2051529cfe68.zip
Merge from trunk.
Subversion-branch: /branches/raven-branch Subversion-revision: 1924
Diffstat (limited to 'src/setup/sound.c')
-rw-r--r--src/setup/sound.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/src/setup/sound.c b/src/setup/sound.c
index 97037ee9..61182753 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -40,17 +40,18 @@ typedef enum
NUM_SFXMODES
} sfxmode_t;
-static char *sfxmode_strings[] =
+static char *sfxmode_strings[] =
{
"Disabled",
"Digital",
"PC speaker"
};
-typedef enum
+typedef enum
{
MUSICMODE_DISABLED,
- MUSICMODE_MIDI,
+ MUSICMODE_OPL,
+ MUSICMODE_NATIVE,
MUSICMODE_CD,
NUM_MUSICMODES
} musicmode_t;
@@ -58,14 +59,15 @@ typedef enum
static char *musicmode_strings[] =
{
"Disabled",
- "MIDI",
+ "OPL (Adlib/SB)",
+ "Native MIDI",
"CD audio"
};
// Config file variables:
int snd_sfxdevice = SNDDEVICE_SB;
-int snd_musicdevice = SNDDEVICE_SB;
+int snd_musicdevice = SNDDEVICE_GENMIDI;
int snd_samplerate = 22050;
static int numChannels = 8;
@@ -107,7 +109,10 @@ static void UpdateSndDevices(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(data))
case MUSICMODE_DISABLED:
snd_musicdevice = SNDDEVICE_NONE;
break;
- case MUSICMODE_MIDI:
+ case MUSICMODE_NATIVE:
+ snd_musicdevice = SNDDEVICE_GENMIDI;
+ break;
+ case MUSICMODE_OPL:
snd_musicdevice = SNDDEVICE_SB;
break;
case MUSICMODE_CD:
@@ -138,20 +143,26 @@ void ConfigSound(void)
{
snd_sfxmode = SFXMODE_DISABLED;
}
-
+
// Is music enabled?
- if (snd_musicdevice == SNDDEVICE_NONE)
+ if (snd_musicdevice == SNDDEVICE_GENMIDI)
{
- snd_musicmode = MUSICMODE_DISABLED;
+ snd_musicmode = MUSICMODE_NATIVE;
}
else if (snd_musicmode == SNDDEVICE_CD)
{
snd_musicmode = MUSICMODE_CD;
}
+ else if (snd_musicdevice == SNDDEVICE_SB
+ || snd_musicdevice == SNDDEVICE_ADLIB
+ || snd_musicdevice == SNDDEVICE_AWE32)
+ {
+ snd_musicmode = MUSICMODE_OPL;
+ }
else
{
- snd_musicmode = MUSICMODE_MIDI;
+ snd_musicmode = MUSICMODE_DISABLED;
}
// Doom has PC speaker sound effects, but others do not:
@@ -187,7 +198,7 @@ void ConfigSound(void)
music_table = TXT_NewTable(2),
NULL);
- TXT_SetColumnWidths(sfx_table, 20, 5);
+ TXT_SetColumnWidths(sfx_table, 20, 14);
TXT_AddWidgets(sfx_table,
TXT_NewLabel("Sound effects"),
@@ -200,7 +211,7 @@ void ConfigSound(void)
TXT_NewSpinControl(&sfxVolume, 0, 15),
NULL);
- TXT_SetColumnWidths(music_table, 20, 5);
+ TXT_SetColumnWidths(music_table, 20, 14);
TXT_AddWidgets(music_table,
TXT_NewLabel("Music"),
@@ -213,7 +224,6 @@ void ConfigSound(void)
TXT_SignalConnect(sfx_mode_control, "changed", UpdateSndDevices, NULL);
TXT_SignalConnect(music_mode_control, "changed", UpdateSndDevices, NULL);
-
}
void BindSoundVariables(void)