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/morphos/morphos_sound.cpp | |
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/morphos/morphos_sound.cpp')
-rw-r--r-- | backends/morphos/morphos_sound.cpp | 51 |
1 files changed, 25 insertions, 26 deletions
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; } } |