Opened 16 years ago

Closed 16 years ago

Last modified 12 months ago

#1262 closed defect

PALMOS : music plays too slow !

Reported by: SF/chrilith Owned by: SF/chrilith
Priority: normal Component: Port: PalmOS
Keywords: Cc:
Game:

Description

Hi,

Since the last change to the music engine (timer instead
of thread) the music play too slow with the PalmOS port
and it is out of sync.

Really don't know why :(

Any idea ?

Chris

Ticket imported from: #817337. Ticket imported from: bugs/1262.

Change History (12)

comment:1 by SF/chrilith, 16 years ago

Example : with indy4, when the lucas arts logo appears, the
music start only after the logo is visible, not at start of fade in
and very very slow (or some notes/channels are missing ?)

comment:2 by fingolfin, 16 years ago

First off this definitiely doesn't deserver priority 9: it's not criticial,
all games can still be completed etc.

Secondly, if it's too slow, that would indicate that you are not
firing the timers often enoug, and/or not precise enough...

Assigning to Jamieson just to makes sure he is aware of this,
since he performed the relevant changes (but he did so on my
request).

comment:3 by fingolfin, 16 years ago

Owner: set to SF/jamieson630
Priority: blockernormal

comment:4 by SF/jamieson630, 16 years ago

Hmm, I have no idea. I see MorphOS runs its own Timer
implementation, most of which I don't understand. Chrilith,
note that when I moved to timers I also removed the
midi_driver_thread() implementation for MorphOS, under the
assumption that I could now safely use the Timer interface
without worrying about backend mechanics.

See
http://cvs.sourceforge.net/viewcvs.py/scummvm/scummvm/b
ackends/midi/morphos.cpp?r1=1.9&r2=1.10

Maybe there was something special going on in your
implementation of midi_driver_thread() that I failed to
account for when I switched to timers.

comment:5 by fingolfin, 16 years ago

Note: MorphOS != PalmOS.

Anyway, my guess is this: the old code used to do its "syncing" by
itself; if the thread routine run with an interval > 10ms, it would
loop and exceute its body multiple times (so, if the thread was
only called every 50ms, it would call its body 5 times). The new
code now uses a timer and doesn't do any such thing anymore,
rather it expects the timer to be called in an accurate fashion.

One possible cause for the problem Chrilith is seeing hence would
be that the timer isn't called with the proper frequency on
PalmOS. Can you check that, Chris?

comment:6 by fingolfin, 16 years ago

Owner: SF/jamieson630 removed

comment:7 by SF/chrilith, 16 years ago

Yes sorry for the priority ;)

If i apply the old thread process to the timer, it seems to
works better, but need adjustement.

Thanks for pointing me the solution :) I'll post an update soon
and then ill close this bug.

Thanks again ;)

comment:8 by fingolfin, 16 years ago

Owner: set to SF/chrilith

comment:9 by fingolfin, 16 years ago

What is the status of this item?

comment:10 by SF/chrilith, 16 years ago

Status: newclosed

comment:11 by SF/chrilith, 16 years ago

This is fixed but not yet uploaded.
I close this bug.

comment:12 by digitall, 12 months ago

Component: --Unset--Port: PalmOS
Note: See TracTickets for help on using tickets.