aboutsummaryrefslogtreecommitdiff
path: root/backends/midi/morphos.cpp
diff options
context:
space:
mode:
authorJamieson Christian2003-09-26 14:05:33 +0000
committerJamieson Christian2003-09-26 14:05:33 +0000
commit7f707acfb6bbcb138dbcb04eddc05d91821477a1 (patch)
treefb0a0b967077ab27c1ba4c9be8e67c74e1b0fc9f /backends/midi/morphos.cpp
parentb21208e6a92b4e8082d04994b0c99709e2712472 (diff)
downloadscummvm-rg350-7f707acfb6bbcb138dbcb04eddc05d91821477a1.tar.gz
scummvm-rg350-7f707acfb6bbcb138dbcb04eddc05d91821477a1.tar.bz2
scummvm-rg350-7f707acfb6bbcb138dbcb04eddc05d91821477a1.zip
Converted the MPU-401 timer to use the Timer class.
Since this was the only place where we were using create_thread, that method should be removable now. I also removed the midi_driver_thread overrides for the MorphOS and YPA1 (Palm) backends. These need to be tested by their respective porters. svn-id: r10414
Diffstat (limited to 'backends/midi/morphos.cpp')
-rw-r--r--backends/midi/morphos.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/backends/midi/morphos.cpp b/backends/midi/morphos.cpp
index f75839cdd2..ab941ca6bf 100644
--- a/backends/midi/morphos.cpp
+++ b/backends/midi/morphos.cpp
@@ -94,49 +94,5 @@ MidiDriver *MidiDriver_ETUDE_create()
return EtudeMidiDriver;
}
-int MidiDriver_MPU401::midi_driver_thread(void *param)
-{
- MidiDriver_MPU401 *mid = (MidiDriver_MPU401 *)param;
- int old_time, cur_time;
- MsgPort *music_timer_port = NULL;
- timerequest *music_timer_request = NULL;
-
- // Grab the MidiDriver's mutex. When the MidiDriver
- // shuts down, it will wait on that mutex until we've
- // detected the shutdown and quit looping.
- g_system->lock_mutex(mid->_mutex);
-
- if (!OSystem_MorphOS::OpenATimer(&music_timer_port, (IORequest **) &music_timer_request, UNIT_MICROHZ, false)) {
- warning("Could not open a timer - music will not play");
- Wait(SIGBREAKF_CTRL_C);
- }
- else {
- old_time = g_system->get_msecs();
-
- while (mid->_started_thread) {
- music_timer_request->tr_node.io_Command = TR_ADDREQUEST;
- music_timer_request->tr_time.tv_secs = 0;
- music_timer_request->tr_time.tv_micro = 10000;
- DoIO((struct IORequest *)music_timer_request);
-
- if (!mid->_started_thread || CheckSignal(SIGBREAKF_CTRL_C))
- break;
-
- cur_time = g_system->get_msecs();
- while (old_time < cur_time) {
- old_time += 10;
- if (mid->_timer_proc)
- (*(mid->_timer_proc))(mid->_timer_param);
- }
- }
- CloseDevice((IORequest *) music_timer_request);
- DeleteIORequest((IORequest *) music_timer_request);
- DeleteMsgPort(music_timer_port);
- }
-
- g_system->unlock_mutex(mid->_mutex);
- return 0;
-}
-
#endif