aboutsummaryrefslogtreecommitdiff
path: root/audio/musicplugin.h
diff options
context:
space:
mode:
authorathrxx2011-06-05 18:26:25 +0200
committerathrxx2011-06-05 18:29:13 +0200
commit43075248aaef68ab9eef39c8988854f00eb694b0 (patch)
treee407a94d11c6075cf935f274a5864e549a26b0c9 /audio/musicplugin.h
parent75297cb124c72a40d079a9bb0bb372993de8acbb (diff)
downloadscummvm-rg350-43075248aaef68ab9eef39c8988854f00eb694b0.tar.gz
scummvm-rg350-43075248aaef68ab9eef39c8988854f00eb694b0.tar.bz2
scummvm-rg350-43075248aaef68ab9eef39c8988854f00eb694b0.zip
AUDIO: fix device detection (missing rom files for MT-32 emu)
This is an attempt to fix the problem Max described in his devel mail. The presence of the rom files will now be checked in detectDevice(). In case of failure there will be fallback attempts. The user will get notified of the detection failure if he has expressly selected the device that failed. Please test with your platform / engine (with or without rom files).
Diffstat (limited to 'audio/musicplugin.h')
-rw-r--r--audio/musicplugin.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/audio/musicplugin.h b/audio/musicplugin.h
index 2a25962b87..307293a7c9 100644
--- a/audio/musicplugin.h
+++ b/audio/musicplugin.h
@@ -90,6 +90,13 @@ public:
virtual MusicDevices getDevices() const = 0;
/**
+ * Checks whether a device can actually be used. Currently this is only
+ * implemented for the MT-32 emulator to check whether the required rom
+ * files are present.
+ */
+ virtual bool checkDevice(MidiDriver::DeviceHandle) const { return true; }
+
+ /**
* Tries to instantiate a MIDI Driver instance based on the device
* previously detected via MidiDriver::detectDevice()
*