aboutsummaryrefslogtreecommitdiff
path: root/backends/midi
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 /backends/midi
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 'backends/midi')
-rw-r--r--backends/midi/alsa.cpp14
-rw-r--r--backends/midi/camd.cpp14
-rw-r--r--backends/midi/coreaudio.cpp14
-rw-r--r--backends/midi/coremidi.cpp14
-rw-r--r--backends/midi/dmedia.cpp14
-rw-r--r--backends/midi/quicktime.cpp14
-rw-r--r--backends/midi/seq.cpp14
-rw-r--r--backends/midi/timidity.cpp14
-rw-r--r--backends/midi/windows.cpp14
-rw-r--r--backends/midi/ypa1.cpp14
-rw-r--r--backends/midi/zodiac.cpp14
11 files changed, 154 insertions, 0 deletions
diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp
index fc43925643..6b0e424d68 100644
--- a/backends/midi/alsa.cpp
+++ b/backends/midi/alsa.cpp
@@ -247,6 +247,14 @@ public:
return "ALSA";
}
+ virtual const char *getId() const {
+ return "alsa";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
virtual Common::StringList getDevices() const;
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
@@ -309,4 +317,10 @@ MidiDriver *MidiDriver_ALSA_create(Audio::Mixer *mixer) {
return mididriver;
}
+//#if PLUGIN_ENABLED_DYNAMIC(ALSA)
+ //REGISTER_PLUGIN_DYNAMIC(ALSA, PLUGIN_TYPE_MIDI, AlsaMidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(ALSA, PLUGIN_TYPE_MIDI, AlsaMidiPlugin);
+//#endif
+
#endif
diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp
index 2b5ea0e065..6aa79eb260 100644
--- a/backends/midi/camd.cpp
+++ b/backends/midi/camd.cpp
@@ -172,6 +172,14 @@ public:
return "CAMD";
}
+ virtual const char *getId() const {
+ return "camd";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
//virtual Common::StringList getDevices() const;
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
@@ -192,4 +200,10 @@ MidiDriver *MidiDriver_CAMD_create(Audio::Mixer *mixer) {
return mididriver;
}
+//#if PLUGIN_ENABLED_DYNAMIC(CAMD)
+ //REGISTER_PLUGIN_DYNAMIC(CAMD, PLUGIN_TYPE_MIDI, CamdMidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(CAMD, PLUGIN_TYPE_MIDI, CamdMidiPlugin);
+//#endif
+
#endif
diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp
index 0e8409b3d8..8e00c24a1f 100644
--- a/backends/midi/coreaudio.cpp
+++ b/backends/midi/coreaudio.cpp
@@ -202,6 +202,14 @@ public:
return "CoreAudio";
}
+ virtual const char *getId() const {
+ return "core";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
};
@@ -220,4 +228,10 @@ MidiDriver *MidiDriver_CORE_create(Audio::Mixer *mixer) {
return mididriver;
}
+//#if PLUGIN_ENABLED_DYNAMIC(COREAUDIO)
+ //REGISTER_PLUGIN_DYNAMIC(COREAUDIO, PLUGIN_TYPE_MIDI, CoreAudioMidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(COREAUDIO, PLUGIN_TYPE_MIDI, CoreAudioMidiPlugin);
+//#endif
+
#endif // MACOSX
diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp
index b16e2a91af..efbdaad4e4 100644
--- a/backends/midi/coremidi.cpp
+++ b/backends/midi/coremidi.cpp
@@ -185,6 +185,14 @@ public:
return "CoreMIDI";
}
+ virtual const char *getId() const {
+ return "coremidi";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
};
@@ -203,4 +211,10 @@ MidiDriver *MidiDriver_CoreMIDI_create(Audio::Mixer *mixer) {
return mididriver;
}
+//#if PLUGIN_ENABLED_DYNAMIC(COREMIDI)
+ //REGISTER_PLUGIN_DYNAMIC(COREMIDI, PLUGIN_TYPE_MIDI, CoreMIDIMidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(COREMIDI, PLUGIN_TYPE_MIDI, CoreMIDIMidiPlugin);
+//#endif
+
#endif // MACOSX
diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp
index 0891af4ecb..885081e3e0 100644
--- a/backends/midi/dmedia.cpp
+++ b/backends/midi/dmedia.cpp
@@ -184,6 +184,14 @@ public:
return "DMedia";
}
+ virtual const char *getId() const {
+ return "dmedia";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
};
@@ -202,4 +210,10 @@ MidiDriver *MidiDriver_DMEDIA_create(Audio::Mixer *mixer) {
return mididriver;
}
+//#if PLUGIN_ENABLED_DYNAMIC(DMEDIA)
+ //REGISTER_PLUGIN_DYNAMIC(DMEDIA, PLUGIN_TYPE_MIDI, DMediaMidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(DMEDIA, PLUGIN_TYPE_MIDI, DMediaMidiPlugin);
+//#endif
+
#endif
diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp
index 592d86c76b..950dfa632c 100644
--- a/backends/midi/quicktime.cpp
+++ b/backends/midi/quicktime.cpp
@@ -259,6 +259,14 @@ public:
return "QuickTime";
}
+ virtual const char *getId() const {
+ return "qt";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
};
@@ -277,4 +285,10 @@ MidiDriver *MidiDriver_QT_create(Audio::Mixer *mixer) {
return mididriver;
}
+//#if PLUGIN_ENABLED_DYNAMIC(QT)
+ //REGISTER_PLUGIN_DYNAMIC(QT, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(QT, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin);
+//#endif
+
#endif // MACOSX || macintosh
diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp
index 23baf60ea4..07dfc25142 100644
--- a/backends/midi/seq.cpp
+++ b/backends/midi/seq.cpp
@@ -179,6 +179,14 @@ public:
return "SEQ";
}
+ virtual const char *getId() const {
+ return "seq";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
};
@@ -197,4 +205,10 @@ MidiDriver *MidiDriver_SEQ_create(Audio::Mixer *mixer) {
return mididriver;
}
+//#if PLUGIN_ENABLED_DYNAMIC(SEQ)
+ //REGISTER_PLUGIN_DYNAMIC(SEQ, PLUGIN_TYPE_MIDI, SeqMidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(SEQ, PLUGIN_TYPE_MIDI, SeqMidiPlugin);
+//#endif
+
#endif
diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp
index f146900a12..842fb358bf 100644
--- a/backends/midi/timidity.cpp
+++ b/backends/midi/timidity.cpp
@@ -520,6 +520,14 @@ public:
return "TiMidity";
}
+ virtual const char *getId() const {
+ return "timidity";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
};
@@ -538,4 +546,10 @@ MidiDriver *MidiDriver_TIMIDITY_create(Audio::Mixer *mixer) {
return mididriver;
}
+//#if PLUGIN_ENABLED_DYNAMIC(TIMIDITY)
+ //REGISTER_PLUGIN_DYNAMIC(TIMIDITY, PLUGIN_TYPE_MIDI, TimidityMidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(TIMIDITY, PLUGIN_TYPE_MIDI, TimidityMidiPlugin);
+//#endif
+
#endif // defined (UNIX)
diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp
index 8c1d3bd9ed..083f0eaf96 100644
--- a/backends/midi/windows.cpp
+++ b/backends/midi/windows.cpp
@@ -153,6 +153,14 @@ public:
return "Windows MIDI";
}
+ virtual const char *getId() const {
+ return "windows";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
};
@@ -171,4 +179,10 @@ MidiDriver *MidiDriver_WIN_create(Audio::Mixer *mixer) {
return mididriver;
}
+//#if PLUGIN_ENABLED_DYNAMIC(WINDOWS)
+ //REGISTER_PLUGIN_DYNAMIC(WINDOWS, PLUGIN_TYPE_MIDI, WindowsMidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(WINDOWS, PLUGIN_TYPE_MIDI, WindowsMidiPlugin);
+//#endif
+
#endif
diff --git a/backends/midi/ypa1.cpp b/backends/midi/ypa1.cpp
index 416215424e..37d90d45b0 100644
--- a/backends/midi/ypa1.cpp
+++ b/backends/midi/ypa1.cpp
@@ -112,6 +112,14 @@ public:
return "Yamaha Pa1";
}
+ virtual const char *getId() const {
+ return "ypa1";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
};
@@ -129,3 +137,9 @@ MidiDriver *MidiDriver_YamahaPa1_create(Audio::Mixer *mixer) {
return mididriver;
}
+
+//#if PLUGIN_ENABLED_DYNAMIC(YPA1)
+ //REGISTER_PLUGIN_DYNAMIC(YPA1, PLUGIN_TYPE_MIDI, YamahaPa1MidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(YPA1, PLUGIN_TYPE_MIDI, YamahaPa1MidiPlugin);
+//#endif
diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp
index 0cc848f1d5..f27c042de8 100644
--- a/backends/midi/zodiac.cpp
+++ b/backends/midi/zodiac.cpp
@@ -130,6 +130,14 @@ public:
return "Tapwave Zodiac";
}
+ virtual const char *getId() const {
+ return "zodiac";
+ }
+
+ virtual int getCapabilities() const {
+ return MDT_MIDI;
+ }
+
virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
};
@@ -148,4 +156,10 @@ MidiDriver *MidiDriver_Zodiac_create(Audio::Mixer *mixer) {
return mididriver;
}
+//#if PLUGIN_ENABLED_DYNAMIC(ZODIAC)
+ //REGISTER_PLUGIN_DYNAMIC(ZODIAC, PLUGIN_TYPE_MIDI, ZodiacMidiPlugin);
+//#else
+ REGISTER_PLUGIN_STATIC(ZODIAC, PLUGIN_TYPE_MIDI, ZodiacMidiPlugin);
+//#endif
+
#endif