diff options
| author | Ruediger Hanke | 2002-10-02 23:31:40 +0000 | 
|---|---|---|
| committer | Ruediger Hanke | 2002-10-02 23:31:40 +0000 | 
| commit | 2fd0a3d458caede859c80a6245522218891caac3 (patch) | |
| tree | 576bd608e6652bd3ec11eeda12a20438fa5abc99 /backends | |
| parent | 87ae5b24c7ed1d44865a115e88dc1ddcbbcba218 (diff) | |
| download | scummvm-rg350-2fd0a3d458caede859c80a6245522218891caac3.tar.gz scummvm-rg350-2fd0a3d458caede859c80a6245522218891caac3.tar.bz2 scummvm-rg350-2fd0a3d458caede859c80a6245522218891caac3.zip  | |
Renamed new AMidi to Etude
svn-id: r5079
Diffstat (limited to 'backends')
| -rw-r--r-- | backends/morphos/MorphOS.readme | 6 | ||||
| -rw-r--r-- | backends/morphos/morphos_sound.cpp | 51 | ||||
| -rw-r--r-- | backends/morphos/morphos_sound.h | 4 | ||||
| -rw-r--r-- | backends/morphos/morphos_start.cpp | 2 | 
4 files changed, 31 insertions, 32 deletions
diff --git a/backends/morphos/MorphOS.readme b/backends/morphos/MorphOS.readme index 693ae324c4..201c8f32b8 100644 --- a/backends/morphos/MorphOS.readme +++ b/backends/morphos/MorphOS.readme @@ -1,7 +1,7 @@  This directory contains the source for the MorphOS port of ScummVM. To build, you -must have a proper Geek Gadgets installation. Just type "make" in the MorphOS -subdirectory. If you don't have the includes for AMidi 2 and cdda.library, check -my webpage. If they aren't uploaded yet, feel free to e-mail me. +must have a proper Geek Gadgets installation. If you don't have the includes for +Etude and cdda.library, check my webpage. If they aren't uploaded yet, feel free +to e-mail me.  You don't have to build ScummVM yourself. The latest official and CVS binaries are  available from my website at: diff --git a/backends/morphos/morphos_sound.cpp b/backends/morphos/morphos_sound.cpp index d11fb21339..73f7bea3ae 100644 --- a/backends/morphos/morphos_sound.cpp +++ b/backends/morphos/morphos_sound.cpp @@ -27,7 +27,7 @@  #include <dos/dos.h>  #include <exec/memory.h>  #include <devices/ahi.h> -#include <devices/amidi.h> +#include <devices/etude.h>  #include <clib/alib_protos.h>  #include <proto/exec.h> @@ -53,43 +53,40 @@ static char			*ahiBuf[2]	   = { NULL, NULL };  static MsgPort 	   *ScummMidiPort = NULL;  		 IOMidiRequest *ScummMidiRequest = NULL; -		 Device        *AMidiBase = NULL; +		 Device        *EtudeBase = NULL; -bool init_morphos_music(ULONG MidiUnit) +bool init_morphos_music(ULONG MidiUnit, ULONG DevFlags)  { -	if (ScummMusicDriver && !stricmp(ScummMusicDriver, "-eamidi"))	  // just as ugly as the line below ... +	MidiUnit = ScummMidiUnit;	// Ugly fix, but ... +	ScummMidiPort = CreateMsgPort(); +	if (ScummMidiPort)  	{ -		MidiUnit = ScummMidiUnit;	// Ugly fix, but ... -		ScummMidiPort = CreateMsgPort(); -		if (ScummMidiPort) +		ScummMidiRequest = (IOMidiRequest *) CreateIORequest(ScummMidiPort, sizeof (IOMidiRequest)); +		if (ScummMidiRequest)  		{ -			ScummMidiRequest = (IOMidiRequest *) CreateIORequest(ScummMidiPort, sizeof (IOMidiRequest)); -			if (ScummMidiRequest) -			{ -				ScummMidiRequest->amr_Version = 2; -				if (OpenDevice("amidi.device", MidiUnit, (IORequest *) ScummMidiRequest, 0)) -				{ -					DeleteIORequest((IORequest *) ScummMidiRequest); -					DeleteMsgPort(ScummMidiPort); -					ScummMidiRequest = NULL; -					ScummMidiPort = NULL; -				} -				AMidiBase = ScummMidiRequest->amr_Std.io_Device; -			} -			else +			ScummMidiRequest->emr_Version = 1; +			if (OpenDevice(ETUDENAME, MidiUnit, (IORequest *) ScummMidiRequest, DevFlags))  			{ +				DeleteIORequest((IORequest *) ScummMidiRequest);  				DeleteMsgPort(ScummMidiPort); +				ScummMidiRequest = NULL;  				ScummMidiPort = NULL;  			} +			EtudeBase = ScummMidiRequest->emr_Std.io_Device;  		} - -		if (!ScummMidiRequest) +		else  		{ -			warning("Could not open AMidi - music will not play"); -			return false; +			DeleteMsgPort(ScummMidiPort); +			ScummMidiPort = NULL;  		}  	} +	if (!ScummMidiRequest) +	{ +		warning("Could not open Etude - music will not play"); +		return false; +	} +  	return true;  } @@ -101,7 +98,9 @@ void exit_morphos_music()  		CloseDevice((IORequest *) ScummMidiRequest);  		DeleteIORequest((IORequest *) ScummMidiRequest);  		DeleteMsgPort(ScummMidiPort); -		AMidiBase = NULL; +		ScummMidiRequest = NULL; +		ScummMidiPort = NULL; +		EtudeBase = NULL;  	}  } diff --git a/backends/morphos/morphos_sound.h b/backends/morphos/morphos_sound.h index fd40b77748..fac6d15899 100644 --- a/backends/morphos/morphos_sound.h +++ b/backends/morphos/morphos_sound.h @@ -25,12 +25,12 @@  #define MORPHOS_SOUND_H  #include <exec/semaphores.h> -#include <devices/amidi.h> +#include <devices/etude.h>  class OSystem_MorphOS;  int morphos_sound_thread(OSystem_MorphOS *syst, ULONG SampleType); -bool init_morphos_music(ULONG MidiUnit); +bool init_morphos_music(ULONG MidiUnit, ULONG DevFlags);  void exit_morphos_music();  extern SignalSemaphore ScummMusicThreadRunning; diff --git a/backends/morphos/morphos_start.cpp b/backends/morphos/morphos_start.cpp index 82c582d84a..ead98ce614 100644 --- a/backends/morphos/morphos_start.cpp +++ b/backends/morphos/morphos_start.cpp @@ -117,7 +117,7 @@ void close_resources()  static STRPTR FindMusicDriver(STRPTR argval)  {  	if (!stricmp(argval, "off"))  	return "-enull"; -	if (!stricmp(argval, "midi"))	 	return "-eamidi"; +	if (!stricmp(argval, "midi"))	 	return "-eetude";  	if (!stricmp(argval, "midiemu"))	return "-emidiemu";  	if (!stricmp(argval, "adlib")) 	return "-eadlib";  | 
