aboutsummaryrefslogtreecommitdiff
path: root/backends/midi/zodiac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/midi/zodiac.cpp')
-rw-r--r--backends/midi/zodiac.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp
index f27c042de8..456e4df43a 100644
--- a/backends/midi/zodiac.cpp
+++ b/backends/midi/zodiac.cpp
@@ -23,7 +23,7 @@
*/
#include "common/util.h"
-#include "sound/midiplugin.h"
+#include "sound/musicplugin.h"
#include "sound/mpu401.h"
#ifndef DISABLE_TAPWAVE
@@ -124,24 +124,29 @@ void MidiDriver_Zodiac::sysEx(const byte *msg, uint16 length) {
// Plugin interface
-class ZodiacMidiPlugin : public MidiPluginObject {
+class ZodiacMusicPlugin : public MusicPluginObject {
public:
- virtual const char *getName() const {
+ const char *getName() const {
return "Tapwave Zodiac";
}
- virtual const char *getId() const {
+ const char *getId() const {
return "zodiac";
}
- virtual int getCapabilities() const {
- return MDT_MIDI;
- }
-
- virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
+ MusicDevices getDevices() const;
+ PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const;
};
-PluginError ZodiacMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
+MusicDevices ZodiacMusicPlugin::getDevices() const {
+ MusicDevices devices;
+ // TODO: Return a different music type depending on the configuration
+ // TODO: List the available devices
+ devices.push_back(MusicDevice(this, "", MT_GM));
+ return devices;
+}
+
+PluginError ZodiacMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const {
*mididriver = new MidiDriver_Zodiac();
return kNoError;
@@ -150,16 +155,16 @@ PluginError ZodiacMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **m
MidiDriver *MidiDriver_Zodiac_create(Audio::Mixer *mixer) {
MidiDriver *mididriver;
- ZodiacMidiPlugin p;
+ ZodiacMusicPlugin p;
p.createInstance(mixer, &mididriver);
return mididriver;
}
//#if PLUGIN_ENABLED_DYNAMIC(ZODIAC)
- //REGISTER_PLUGIN_DYNAMIC(ZODIAC, PLUGIN_TYPE_MIDI, ZodiacMidiPlugin);
+ //REGISTER_PLUGIN_DYNAMIC(ZODIAC, PLUGIN_TYPE_MUSIC, ZodiacMusicPlugin);
//#else
- REGISTER_PLUGIN_STATIC(ZODIAC, PLUGIN_TYPE_MIDI, ZodiacMidiPlugin);
+ REGISTER_PLUGIN_STATIC(ZODIAC, PLUGIN_TYPE_MUSIC, ZodiacMusicPlugin);
//#endif
#endif