- extended $mididevice to add an optional parameter, which has the following meaning for the different MIDI devices:

* OPL: specify the core to use for playing this song
* FluidSynth: specify a soundfont that should be used for playing the song.
* WildMidi: specify a config file that should be used for playing the song.
* Timidity++: specify an executable that should be used for playing the song. At least under Windows this allows using Timidity++ with different configs if the executable and each single config are placed in different directories.
* GUS: currently not operational, but should later also specify the config. This will need some work, because right now this is initialized only when the sound system is initialized.
* all other: no function.

These options should mainly be for end users who want to fine-tune how to play the music.
This commit is contained in:
Christoph Oelckers 2015-12-31 23:03:53 +01:00
commit 5e975ac9f6
21 changed files with 135 additions and 79 deletions

View file

@ -2421,11 +2421,8 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
{
int lumpnum = -1;
int length = 0;
int device = MDEV_DEFAULT;
MusInfo *handle = NULL;
int *devp = MidiDevices.CheckKey(musicname);
if (devp != NULL) device = *devp;
MidiDeviceSetting *devp = MidiDevices.CheckKey(musicname);
// Strip off any leading file:// component.
if (strncmp(musicname, "file://", 7) == 0)
@ -2495,7 +2492,7 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
}
else
{
mus_playing.handle = I_RegisterSong (reader, device);
mus_playing.handle = I_RegisterSong (reader, devp);
}
}