aboutsummaryrefslogtreecommitdiff
path: root/backends/midi
diff options
context:
space:
mode:
Diffstat (limited to 'backends/midi')
-rw-r--r--backends/midi/alsa.cpp13
-rw-r--r--backends/midi/camd.cpp13
-rw-r--r--backends/midi/coreaudio.cpp3
-rw-r--r--backends/midi/coremidi.cpp3
-rw-r--r--backends/midi/dmedia.cpp8
-rw-r--r--backends/midi/seq.cpp3
-rw-r--r--backends/midi/stmidi.cpp3
-rw-r--r--backends/midi/timidity.cpp5
-rw-r--r--backends/midi/windows.cpp3
9 files changed, 24 insertions, 30 deletions
diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp
index 5110734a18..28e44b445a 100644
--- a/backends/midi/alsa.cpp
+++ b/backends/midi/alsa.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// Disable symbol overrides so that we can use system headers.
@@ -183,6 +180,11 @@ void MidiDriver_ALSA::close() {
}
void MidiDriver_ALSA::send(uint32 b) {
+ if (!_isOpen) {
+ warning("MidiDriver_ALSA: Got event while not open");
+ return;
+ }
+
unsigned int midiCmd[4];
ev.type = SND_SEQ_EVENT_OSS;
@@ -256,6 +258,11 @@ void MidiDriver_ALSA::send(uint32 b) {
}
void MidiDriver_ALSA::sysEx(const byte *msg, uint16 length) {
+ if (!_isOpen) {
+ warning("MidiDriver_ALSA: Got SysEx while not open");
+ return;
+ }
+
unsigned char buf[266];
assert(length + 2 <= ARRAYSIZE(buf));
diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp
index cc791cf7c0..88973488ca 100644
--- a/backends/midi/camd.cpp
+++ b/backends/midi/camd.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// Disable symbol overrides so that we can use system headers.
@@ -116,11 +113,21 @@ void MidiDriver_CAMD::close() {
}
void MidiDriver_CAMD::send(uint32 b) {
+ if (!_isOpen) {
+ warning("MidiDriver_CAMD: Got event while not open");
+ return;
+ }
+
ULONG data = READ_LE_UINT32(&b);
_ICamd->PutMidi(_midi_link, data);
}
void MidiDriver_CAMD::sysEx(const byte *msg, uint16 length) {
+ if (!_isOpen) {
+ warning("MidiDriver_CAMD: Got SysEx while not open");
+ return;
+ }
+
unsigned char buf[266];
assert(length + 2 <= ARRAYSIZE(buf));
diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp
index 52d32cb5e3..305b462836 100644
--- a/backends/midi/coreaudio.cpp
+++ b/backends/midi/coreaudio.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp
index 87cd6307ba..1d61dceba2 100644
--- a/backends/midi/coremidi.cpp
+++ b/backends/midi/coremidi.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp
index c4c1968354..68e957f9aa 100644
--- a/backends/midi/dmedia.cpp
+++ b/backends/midi/dmedia.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
/*
@@ -34,9 +31,10 @@
#if defined(IRIX)
-#include "common/scummsys.h"
-#include "common/util.h"
#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/textconsole.h"
+#include "common/util.h"
#include "audio/musicplugin.h"
#include "audio/mpu401.h"
diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp
index b90a9b19e0..4efad9ceae 100644
--- a/backends/midi/seq.cpp
+++ b/backends/midi/seq.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
/*
diff --git a/backends/midi/stmidi.cpp b/backends/midi/stmidi.cpp
index 42f829a7a3..53302f8a80 100644
--- a/backends/midi/stmidi.cpp
+++ b/backends/midi/stmidi.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
/*
diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp
index dd76196ae0..87cd08659c 100644
--- a/backends/midi/timidity.cpp
+++ b/backends/midi/timidity.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
/*
@@ -560,4 +557,4 @@ Common::Error TimidityMusicPlugin::createInstance(MidiDriver **mididriver, MidiD
REGISTER_PLUGIN_STATIC(TIMIDITY, PLUGIN_TYPE_MUSIC, TimidityMusicPlugin);
//#endif
-#endif // defined (UNIX)
+#endif // defined (USE_TIMIDITY)
diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp
index 292bbea79e..828411cd22 100644
--- a/backends/midi/windows.cpp
+++ b/backends/midi/windows.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
// Disable symbol overrides so that we can use system headers.