Difference between revisions of "Music drivers redesign"

Jump to navigation Jump to search
m
behaviour -> behavior
(Add rough analysis on which engines use which music type)
m (behaviour -> behavior)
 
(5 intermediate revisions by 3 users not shown)
Line 6: Line 6:


=Music drivers types (interfaces)=
=Music drivers types (interfaces)=
*AdLib (MTD_ADLIB)
*AdLib (MDT_ADLIB)
*FM Towns (MTD_TOWNS)
*FM Towns (MDT_TOWNS)
*PC Speaker (MTD_SPKR)
*PC Speaker (MDT_SPKR)
*PCJr (MTD_PCJR)
*PCJr (MDT_PCJR)
*Apple ii? (MTD_APPLEII?)
*Apple II? (MDT_APPLEII?)
*MIDI
*MIDI
**GM (MTD_GM)
**GM (MDT_GM)
**MT32 (MTD_MT32)
**MT32 (MDT_MT32)
**GS (MTD_GS)
**GS (MDT_GS)
**...?
**...?
*Digitalised/CD-Audio (MTD_DIGI?)
*Digitized/CD-Audio (MDT_DIGI?)
*...?
*...?


=Usage from the engines=
=Usage from the engines=
There are two proposals currently. The first one delegates all the work to the music driver manager involving just one call to it which already returns the music driver created depending on the settings, and it just has to be casted to use it. This ensures a coherent behaviour through all the engines:
There are two proposals currently. The first one delegates all the work to the music driver manager involving just one call to it which already returns the music driver created depending on the settings, and it just has to be casted to use it. This ensures a coherent behavior through all the engines:
  musicdriver = MusicDriverManager->createDriver(MusicTypePreferenceList(MDT_MT32, MDT_ADLIB, MDT_SPKR));
  musicdriver = MusicDriverManager->createDriver(MusicTypePreferenceList(MDT_MT32, MDT_ADLIB, MDT_SPKR));
  switch (musicdriver->type) {
  switch (musicdriver->type) {
Line 53: Line 53:
*General configuration:
*General configuration:
**The user can configure the default options of the drivers/devices (This ALSA device is an MT-32 and use this volume, the FluidSynth driver should use this soundfont file, ...)
**The user can configure the default options of the drivers/devices (This ALSA device is an MT-32 and use this volume, the FluidSynth driver should use this soundfont file, ...)
**The user can priorize the music types globaly (i.e. I prefer GM, then AdLib, then PC Speaker, and nothing else) and the default driver/device for each type
**The user can prioritize the music types globally (i.e. I prefer GM, then AdLib, then PC Speaker, and nothing else) and the default driver/device for each type
*For each game:
*For each game:
**The MetaEngine offers an API for querying which music types are supported by a given target, in order of preference and the user can choose one of those (default will use the previously configured priorities)
**The MetaEngine offers an API for querying which music types are supported by a given target, in order of preference and the user can choose one of those (default will use the previously configured priorities)
Line 63: Line 63:
*Engines using no MIDI at all:
*Engines using no MIDI at all:
** drascula
** drascula
** m4
** tucker
** tucker
** sword1
** sword1
** sword2
** sword2


*Engines using MIDI and without any special adlib support (so they use the AdLib driver at most as a cheap MIDI "emulator"):
*Engines using MIDI and without any special AdLib support (so they use the AdLib driver at most as a cheap MIDI "emulator"):
** agi
** agi
** agos
** agos
** draci
** draci
** m4
** made
** made
** mohawk
** mohawk
Line 83: Line 83:
** cruise
** cruise
** gob
** gob
** groovie ??
** groovie (it just loads custom instruments, nothing fancier)
** kyra
** kyra
** lure ??
** lure ??
Line 98: Line 98:
** scumm
** scumm


*MDT_TOWNS and MDT_CMS are *only* used by SCUMM. Kyra has custom FM-TOWNS code.  
*MDT_TOWNS and MDT_CMS are *only* used by SCUMM. Kyra has custom FM-TOWNS code. Kyra FM-Towns games also feature the possibility of Audio CD playback for some game tracks.


*MDT_TOWNS can probably be removed -- it should only be enabled for FM-TOWNS games anyway.
*MDT_TOWNS can probably be removed -- it should only be enabled for FM-TOWNS games anyway.
2,051

edits

Navigation menu