[Scummvm-cvs-logs] CVS: scummvm/backends/midi morphos.cpp,1.9,1.10 ypa1.cpp,1.7,1.8
Jamieson Christian
jamieson630 at users.sourceforge.net
Fri Sep 26 07:06:14 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/bs2 anims.cpp,1.17,1.18 build_display.cpp,1.23,1.24 build_display.h,1.3,1.4 controls.cpp,1.17,1.18 events.cpp,1.4,1.5 events.h,1.1,1.2 function.cpp,1.14,1.15 header.h,1.1,1.2 icons.cpp,1.7,1.8 icons.h,1.2,1.3 layers.cpp,1.6,1.7 layers.h,1.2,1.3 logic.cpp,1.13,1.14 logic.h,1.2,1.3 maketext.cpp,1.12,1.13 mem_view.cpp,1.8,1.9 mem_view.h,1.3,1.4 memory.cpp,1.6,1.7 mouse.cpp,1.16,1.17 protocol.cpp,1.9,1.10 protocol.h,1.2,1.3 resman.cpp,1.42,1.43 resman.h,1.3,1.4 save_rest.cpp,1.17,1.18 scroll.cpp,1.3,1.4 sound.cpp,1.16,1.17 speech.cpp,1.21,1.22 startup.cpp,1.12,1.13 sword2.cpp,1.38,1.39 sync.cpp,1.4,1.5 sync.h,1.2,1.3 tony_gsdk.cpp,1.8,1.9 walker.cpp,1.6,1.7
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sound mpu401.cpp,1.18,1.19 mpu401.h,1.14,1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/backends/midi
In directory sc8-pr-cvs1:/tmp/cvs-serv18895/backends/midi
Modified Files:
morphos.cpp ypa1.cpp
Log Message:
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.
Index: morphos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/morphos.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- morphos.cpp 18 Sep 2003 02:07:15 -0000 1.9
+++ morphos.cpp 26 Sep 2003 14:05:33 -0000 1.10
@@ -94,49 +94,5 @@
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
Index: ypa1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/ypa1.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ypa1.cpp 18 Sep 2003 02:07:15 -0000 1.7
+++ ypa1.cpp 26 Sep 2003 14:05:33 -0000 1.8
@@ -103,34 +103,3 @@
MidiDriver *MidiDriver_YamahaPa1_create() {
return new MidiDriver_YamahaPa1();
}
-
-//////////////////////////////////////////
-// thread emu
-#include "palm.h"
-
-int MidiDriver_MPU401::midi_driver_thread(void *param) {
- MidiDriver_MPU401 *mid = (MidiDriver_MPU401 *)param;
- int cur_time;
-
- if (mid->_started_thread) {
- UInt8 id = ((OSystem_PALMOS *)g_system)->_threadID;
- ThreadEmuPtr thread = &(((OSystem_PALMOS *)g_system)->_thread[id]);
-
- // wait 10 msecs
- cur_time = g_system->get_msecs();
- if (cur_time - thread->old_time >= 10)
- thread->sleep = false;
-
- // if 10 msecs
- if (!thread->sleep) {
- thread->sleep = true;
- while (thread->old_time < cur_time) {
- thread->old_time += 10;
- if (mid->_timer_proc)
- (*(mid->_timer_proc)) (mid->_timer_param);
- }
- }
- }
-
- return 0;
-}
\ No newline at end of file
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/bs2 anims.cpp,1.17,1.18 build_display.cpp,1.23,1.24 build_display.h,1.3,1.4 controls.cpp,1.17,1.18 events.cpp,1.4,1.5 events.h,1.1,1.2 function.cpp,1.14,1.15 header.h,1.1,1.2 icons.cpp,1.7,1.8 icons.h,1.2,1.3 layers.cpp,1.6,1.7 layers.h,1.2,1.3 logic.cpp,1.13,1.14 logic.h,1.2,1.3 maketext.cpp,1.12,1.13 mem_view.cpp,1.8,1.9 mem_view.h,1.3,1.4 memory.cpp,1.6,1.7 mouse.cpp,1.16,1.17 protocol.cpp,1.9,1.10 protocol.h,1.2,1.3 resman.cpp,1.42,1.43 resman.h,1.3,1.4 save_rest.cpp,1.17,1.18 scroll.cpp,1.3,1.4 sound.cpp,1.16,1.17 speech.cpp,1.21,1.22 startup.cpp,1.12,1.13 sword2.cpp,1.38,1.39 sync.cpp,1.4,1.5 sync.h,1.2,1.3 tony_gsdk.cpp,1.8,1.9 walker.cpp,1.6,1.7
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sound mpu401.cpp,1.18,1.19 mpu401.h,1.14,1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list