Difference between revisions of "Talk:Music drivers redesign"

From ScummVM :: Wiki
Jump to navigation Jump to search
(New page: Actually, a 3rd variant for the usage is this: musictype = MusicDriverManager->getMusicType(MusicTypePreferenceList(MDT_MT32, MDT_ADLIB, MDT_SPKR)); switch (musictype) { case MDT_ADLIB:...)
 
(New section: FMOpl based MIDI driver)
 
Line 12: Line 12:


This way, engines can still insert special code to handle certain music types, while still benefiting from the uniform instantiation code. [[User:Fingolfin|Fingolfin]] 16:19, 23 May 2008 (CEST)
This way, engines can still insert special code to handle certain music types, while still benefiting from the uniform instantiation code. [[User:Fingolfin|Fingolfin]] 16:19, 23 May 2008 (CEST)
== FMOpl based MIDI driver ==
I just noticed that Pentagram has a [http://pentagram.svn.sourceforge.net/viewvc/pentagram/pentagram/trunk/audio/midi/FMOplMidiDriver.cpp FMOpl based MIDI driver], based on one in Allegro. This one looks much cleaner and more generic than our current one (which really was only ever written for SCUMM). Maybe we could use that code. [[User:Fingolfin|Fingolfin]] 13:04, 9 July 2008 (CEST)

Latest revision as of 11:04, 9 July 2008

Actually, a 3rd variant for the usage is this:

musictype = MusicDriverManager->getMusicType(MusicTypePreferenceList(MDT_MT32, MDT_ADLIB, MDT_SPKR));
switch (musictype) {
case MDT_ADLIB:
  ... // custom adlib handling code, e.g. instantiating an FMOPL instance
  break;
  ...
 default:
   // Default: just use a musicdriver of the appropriate type
   musicdriver = MusicDriverManager->createDriver(musictype);
}

This way, engines can still insert special code to handle certain music types, while still benefiting from the uniform instantiation code. Fingolfin 16:19, 23 May 2008 (CEST)

FMOpl based MIDI driver

I just noticed that Pentagram has a FMOpl based MIDI driver, based on one in Allegro. This one looks much cleaner and more generic than our current one (which really was only ever written for SCUMM). Maybe we could use that code. Fingolfin 13:04, 9 July 2008 (CEST)