[Scummvm-cvs-logs] SF.net SVN: scummvm: [32097] scummvm/trunk

jvprat at users.sourceforge.net jvprat at users.sourceforge.net
Wed May 14 07:47:29 CEST 2008


Revision: 32097
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32097&view=rev
Author:   jvprat
Date:     2008-05-13 22:47:29 -0700 (Tue, 13 May 2008)

Log Message:
-----------
Moved midiplugin.h to sound/ since it will be used for more than just the native MIDI drivers.

Modified Paths:
--------------
    scummvm/trunk/backends/midi/alsa.cpp
    scummvm/trunk/backends/midi/camd.cpp
    scummvm/trunk/backends/midi/coreaudio.cpp
    scummvm/trunk/backends/midi/coremidi.cpp
    scummvm/trunk/backends/midi/dmedia.cpp
    scummvm/trunk/backends/midi/quicktime.cpp
    scummvm/trunk/backends/midi/seq.cpp
    scummvm/trunk/backends/midi/timidity.cpp
    scummvm/trunk/backends/midi/windows.cpp
    scummvm/trunk/backends/midi/ypa1.cpp
    scummvm/trunk/backends/midi/zodiac.cpp
    scummvm/trunk/dists/msvc7/scummvm.vcproj
    scummvm/trunk/dists/msvc71/scummvm.vcproj
    scummvm/trunk/dists/msvc8/scummvm.vcproj
    scummvm/trunk/dists/msvc9/scummvm.vcproj

Added Paths:
-----------
    scummvm/trunk/sound/midiplugin.h

Removed Paths:
-------------
    scummvm/trunk/backends/midi/midiplugin.h

Modified: scummvm/trunk/backends/midi/alsa.cpp
===================================================================
--- scummvm/trunk/backends/midi/alsa.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/alsa.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -26,9 +26,9 @@
 
 #if defined(UNIX) && defined(USE_ALSA)
 
-#include "backends/midi/midiplugin.h"
 #include "common/config-manager.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include <alsa/asoundlib.h>
@@ -241,7 +241,7 @@
 
 // Plugin interface
 
-class AlsaMidiPlugin : public MidiPlugin {
+class AlsaMidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "ALSA";

Modified: scummvm/trunk/backends/midi/camd.cpp
===================================================================
--- scummvm/trunk/backends/midi/camd.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/camd.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -26,9 +26,9 @@
 
 #if defined(__amigaos4__)
 
-#include "backends/midi/midiplugin.h"
 #include "common/endian.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include <proto/camd.h>
@@ -166,7 +166,7 @@
 
 // Plugin interface
 
-class CamdMidiPlugin : public MidiPlugin {
+class CamdMidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "CAMD";

Modified: scummvm/trunk/backends/midi/coreaudio.cpp
===================================================================
--- scummvm/trunk/backends/midi/coreaudio.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/coreaudio.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -24,9 +24,9 @@
 
 #ifdef MACOSX
 
-#include "backends/midi/midiplugin.h"
 #include "common/config-manager.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include <AudioToolbox/AUGraph.h>
@@ -196,7 +196,7 @@
 
 // Plugin interface
 
-class CoreAudioMidiPlugin : public MidiPlugin {
+class CoreAudioMidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "CoreAudio";

Modified: scummvm/trunk/backends/midi/coremidi.cpp
===================================================================
--- scummvm/trunk/backends/midi/coremidi.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/coremidi.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -24,9 +24,9 @@
 
 #ifdef MACOSX
 
-#include "backends/midi/midiplugin.h"
 #include "common/config-manager.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include <CoreMIDI/CoreMIDI.h>
@@ -179,7 +179,7 @@
 
 // Plugin interface
 
-class CoreMIDIMidiPlugin : public MidiPlugin {
+class CoreMIDIMidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "CoreMIDI";

Modified: scummvm/trunk/backends/midi/dmedia.cpp
===================================================================
--- scummvm/trunk/backends/midi/dmedia.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/dmedia.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -29,9 +29,9 @@
 
 #if defined(IRIX)
 
-#include "backends/midi/midiplugin.h"
 #include "common/scummsys.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include <dmedia/midi.h>
@@ -178,7 +178,7 @@
 
 // Plugin interface
 
-class DMediaMidiPlugin : public MidiPlugin {
+class DMediaMidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "DMedia";

Deleted: scummvm/trunk/backends/midi/midiplugin.h
===================================================================
--- scummvm/trunk/backends/midi/midiplugin.h	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/midiplugin.h	2008-05-14 05:47:29 UTC (rev 32097)
@@ -1,62 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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$
- */
-
-#ifndef BACKENDS_MIDI_MIDIPLUGIN_H
-#define BACKENDS_MIDI_MIDIPLUGIN_H
-
-#include "base/plugins.h"
-#include "sound/mididrv.h"
-
-/**
- * A MidiPlugin is essentially a factory for MidiDriver instances with the
- * added ability of listing the available devices and their capabilities.
- */
-class MidiPlugin : public PluginObject {
-public:
-	virtual ~MidiPlugin() {}
-
-	/**
-	 * Returns a list of the available devices. The empty string means the
-	 * default device.
-	 */
-	virtual Common::StringList getDevices() const {
-		Common::StringList dev;
-		dev.push_back("");
-		return dev;
-	}
-
-	/**
-	 * Tries to instantiate an engine instance based on the settings of
-	 * the currently active ConfMan target. That is, the MidiPlugin should
-	 * query the ConfMan singleton for the device name, port, etc.
-	 *
-	 * @param mixer			Pointer to the global Mixer object
-	 * @param mididriver	Pointer to a pointer which the MidiPlugin sets to
-	 *				the newly create MidiDriver, or 0 in case of an error
-	 * @return		a PluginError describing the error which occurred, or kNoError
-	 */
-	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const = 0;
-};
-
-#endif

Modified: scummvm/trunk/backends/midi/quicktime.cpp
===================================================================
--- scummvm/trunk/backends/midi/quicktime.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/quicktime.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -24,9 +24,9 @@
 
 #if defined(MACOSX) || defined(macintosh)
 
-#include "backends/midi/midiplugin.h"
 #include "common/endian.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #if defined(MACOSX)
@@ -253,7 +253,7 @@
 
 // Plugin interface
 
-class QuickTimeMidiPlugin : public MidiPlugin {
+class QuickTimeMidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "QuickTime";

Modified: scummvm/trunk/backends/midi/seq.cpp
===================================================================
--- scummvm/trunk/backends/midi/seq.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/seq.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -30,8 +30,8 @@
 
 #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__)
 
-#include "backends/midi/midiplugin.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include <fcntl.h>
@@ -173,7 +173,7 @@
 
 // Plugin interface
 
-class SeqMidiPlugin : public MidiPlugin {
+class SeqMidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "SEQ";

Modified: scummvm/trunk/backends/midi/timidity.cpp
===================================================================
--- scummvm/trunk/backends/midi/timidity.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/timidity.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -36,8 +36,8 @@
 
 #if defined (UNIX)
 
-#include "backends/midi/midiplugin.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include <fcntl.h>
@@ -514,7 +514,7 @@
 
 // Plugin interface
 
-class TimidityMidiPlugin : public MidiPlugin {
+class TimidityMidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "TiMidity";

Modified: scummvm/trunk/backends/midi/windows.cpp
===================================================================
--- scummvm/trunk/backends/midi/windows.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/windows.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -28,7 +28,7 @@
 // winnt.h defines ARRAYSIZE, but we want our own one...
 #undef ARRAYSIZE
 
-#include "backends/midi/midiplugin.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include <mmsystem.h>
@@ -147,7 +147,7 @@
 
 // Plugin interface
 
-class WindowsMidiPlugin : public MidiPlugin {
+class WindowsMidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "Windows MIDI";

Modified: scummvm/trunk/backends/midi/ypa1.cpp
===================================================================
--- scummvm/trunk/backends/midi/ypa1.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/ypa1.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -22,8 +22,8 @@
  * $Id$
  */
 
-#include "backends/midi/midiplugin.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #include "Pa1Lib.h"
@@ -106,7 +106,7 @@
 
 // Plugin interface
 
-class YamahaPa1MidiPlugin : public MidiPlugin {
+class YamahaPa1MidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "Yamaha Pa1";

Modified: scummvm/trunk/backends/midi/zodiac.cpp
===================================================================
--- scummvm/trunk/backends/midi/zodiac.cpp	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/backends/midi/zodiac.cpp	2008-05-14 05:47:29 UTC (rev 32097)
@@ -22,8 +22,8 @@
  * $Id$
  */
 
-#include "backends/midi/midiplugin.h"
 #include "common/util.h"
+#include "sound/midiplugin.h"
 #include "sound/mpu401.h"
 
 #ifndef DISABLE_TAPWAVE
@@ -124,7 +124,7 @@
 
 // Plugin interface
 
-class ZodiacMidiPlugin : public MidiPlugin {
+class ZodiacMidiPlugin : public MidiPluginObject {
 public:
 	virtual const char *getName() const {
 		return "Tapwave Zodiac";

Modified: scummvm/trunk/dists/msvc7/scummvm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc7/scummvm.vcproj	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/dists/msvc7/scummvm.vcproj	2008-05-14 05:47:29 UTC (rev 32097)
@@ -679,7 +679,7 @@
 			<Filter
 				Name="midi">
 				<File
-					RelativePath="..\..\backends\midi\midiplugin.h">
+					RelativePath="..\..\sound\midiplugin.h">
 				</File>
 				<File
 					RelativePath="..\..\backends\midi\windows.cpp">

Modified: scummvm/trunk/dists/msvc71/scummvm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc71/scummvm.vcproj	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/dists/msvc71/scummvm.vcproj	2008-05-14 05:47:29 UTC (rev 32097)
@@ -693,7 +693,7 @@
 			<Filter
 				Name="midi">
 				<File
-					RelativePath="..\..\backends\midi\midiplugin.h">
+					RelativePath="..\..\sound\midiplugin.h">
 				</File>
 				<File
 					RelativePath="..\..\backends\midi\windows.cpp">

Modified: scummvm/trunk/dists/msvc8/scummvm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc8/scummvm.vcproj	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/dists/msvc8/scummvm.vcproj	2008-05-14 05:47:29 UTC (rev 32097)
@@ -939,7 +939,7 @@
 				Name="midi"
 				>
 				<File
-					RelativePath="..\..\backends\midi\midiplugin.h"
+					RelativePath="..\..\sound\midiplugin.h"
 					>
 				</File>
 				<File

Modified: scummvm/trunk/dists/msvc9/scummvm.vcproj
===================================================================
--- scummvm/trunk/dists/msvc9/scummvm.vcproj	2008-05-14 03:35:06 UTC (rev 32096)
+++ scummvm/trunk/dists/msvc9/scummvm.vcproj	2008-05-14 05:47:29 UTC (rev 32097)
@@ -944,7 +944,7 @@
 				Name="midi"
 				>
 				<File
-					RelativePath="..\..\backends\midi\midiplugin.h"
+					RelativePath="..\..\sound\midiplugin.h"
 					>
 				</File>
 				<File

Copied: scummvm/trunk/sound/midiplugin.h (from rev 32096, scummvm/trunk/backends/midi/midiplugin.h)
===================================================================
--- scummvm/trunk/sound/midiplugin.h	                        (rev 0)
+++ scummvm/trunk/sound/midiplugin.h	2008-05-14 05:47:29 UTC (rev 32097)
@@ -0,0 +1,62 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * 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$
+ */
+
+#ifndef BACKENDS_MIDI_MIDIPLUGIN_H
+#define BACKENDS_MIDI_MIDIPLUGIN_H
+
+#include "base/plugins.h"
+#include "sound/mididrv.h"
+
+/**
+ * A MidiPluginObject is essentially a factory for MidiDriver instances with
+ * the added ability of listing the available devices and their capabilities.
+ */
+class MidiPluginObject : public PluginObject {
+public:
+	virtual ~MidiPluginObject() {}
+
+	/**
+	 * Returns a list of the available devices. The empty string means the
+	 * default device.
+	 */
+	virtual Common::StringList getDevices() const {
+		Common::StringList dev;
+		dev.push_back("");
+		return dev;
+	}
+
+	/**
+	 * Tries to instantiate a MIDI Driver instance based on the settings of
+	 * the currently active ConfMan target. That is, the MidiPluginObject
+	 * should query the ConfMan singleton for the device name, port, etc.
+	 *
+	 * @param mixer			Pointer to the global Mixer object
+	 * @param mididriver	Pointer to a pointer which the MidiPluginObject sets
+	 *				to the newly create MidiDriver, or 0 in case of an error
+	 * @return		a PluginError describing the error which occurred, or kNoError
+	 */
+	virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const = 0;
+};
+
+#endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list