aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorJordi Vilalta Prat2008-05-14 14:56:29 +0000
committerJordi Vilalta Prat2008-05-14 14:56:29 +0000
commiteb6c809d2b3ccf238fa5efbf45b6cd2b00a82cd9 (patch)
treed52fc76e91a873d7f457b6f97cb57039210895ee /base
parente2d58f4885352744c88892e93fe2cdd33ecfa1b0 (diff)
downloadscummvm-rg350-eb6c809d2b3ccf238fa5efbf45b6cd2b00a82cd9.tar.gz
scummvm-rg350-eb6c809d2b3ccf238fa5efbf45b6cd2b00a82cd9.tar.bz2
scummvm-rg350-eb6c809d2b3ccf238fa5efbf45b6cd2b00a82cd9.zip
- Added more information (ID and capabilities) to the MIDI drivers
- Added the MidiPlugin interface to the remaining MIDI drivers - Added an initial MidiManager to handle the MIDI plugins (just static plugins by now) svn-id: r32117
Diffstat (limited to 'base')
-rw-r--r--base/plugins.cpp56
-rw-r--r--base/plugins.h2
2 files changed, 58 insertions, 0 deletions
diff --git a/base/plugins.cpp b/base/plugins.cpp
index c39b877eb8..7dae94e006 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -33,6 +33,7 @@
int pluginTypeVersions[PLUGIN_TYPE_MAX] = {
PLUGIN_TYPE_ENGINE_VERSION,
+ PLUGIN_TYPE_MIDI_VERSION,
};
@@ -82,6 +83,7 @@ public:
// "Loader" for the static plugins.
// Iterate over all registered (static) plugins and load them.
+ // Engine plugins
#if PLUGIN_ENABLED_STATIC(SCUMM)
LINK_PLUGIN(SCUMM)
#endif
@@ -140,6 +142,49 @@ public:
LINK_PLUGIN(TOUCHE)
#endif
+ // MIDI plugins
+ // TODO: Use defines to disable or enable each MIDI driver as a
+ // static/dynamic plugin, like it's done for the engines
+ LINK_PLUGIN(NULL)
+ #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+ LINK_PLUGIN(WINDOWS)
+ #endif
+ #if defined(UNIX) && defined(USE_ALSA)
+ LINK_PLUGIN(ALSA)
+ #endif
+ #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__)
+ LINK_PLUGIN(SEQ)
+ #endif
+ #if defined(IRIX)
+ LINK_PLUGIN(DMEDIA)
+ #endif
+ #if defined(__amigaos4__)
+ LINK_PLUGIN(CAMD)
+ #endif
+ #if defined(MACOSX)
+ LINK_PLUGIN(COREAUDIO)
+ LINK_PLUGIN(COREMIDI)
+ LINK_PLUGIN(QUICKTIME)
+ #endif
+ #if defined(PALMOS_MODE)
+ # if defined(COMPILE_CLIE)
+ LINK_PLUGIN(YPA1)
+ # elif defined(COMPILE_ZODIAC) && (!defined(ENABLE_SCUMM) || !defined(PALMOS_ARM))
+ LINK_PLUGIN(ZODIAC)
+ # endif
+ #endif
+ #ifdef USE_FLUIDSYNTH
+ LINK_PLUGIN(FLUIDSYNTH)
+ #endif
+ #ifdef USE_MT32EMU
+ LINK_PLUGIN(MT32)
+ #endif
+ LINK_PLUGIN(ADLIB)
+ LINK_PLUGIN(TOWNS)
+ #if defined (UNIX)
+ LINK_PLUGIN(TIMIDITY)
+ #endif
+
return pl;
}
};
@@ -336,3 +381,14 @@ GameList EngineManager::detectGames(const FSList &fslist) const {
const EnginePlugin::list &EngineManager::getPlugins() const {
return (const EnginePlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE);
}
+
+
+// MIDI plugins
+
+#include "sound/midiplugin.h"
+
+DECLARE_SINGLETON(MidiManager);
+
+const MidiPlugin::list &MidiManager::getPlugins() const {
+ return (const MidiPlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_MIDI);
+}
diff --git a/base/plugins.h b/base/plugins.h
index 92b317498f..b64334074c 100644
--- a/base/plugins.h
+++ b/base/plugins.h
@@ -63,6 +63,7 @@
enum PluginType {
PLUGIN_TYPE_ENGINE = 0,
+ PLUGIN_TYPE_MIDI,
PLUGIN_TYPE_MAX
};
@@ -70,6 +71,7 @@ enum PluginType {
// TODO: Make the engine API version depend on ScummVM's version
// because of the backlinking
#define PLUGIN_TYPE_ENGINE_VERSION 1
+#define PLUGIN_TYPE_MIDI_VERSION 1
extern int pluginTypeVersions[PLUGIN_TYPE_MAX];