[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Beta Version - Please help



Am Die, 17 Aug 1999 hast Du wahrscheinlich geschrieben:
>"Philipp Gühring" wrote:
>
>> And to the programmers:
>> The biggest remaining problem i see is the timing and
>> synchronisation. So I will be glad to get some tips which tools/APIs
>> to use to get timing issues right. (Just look at the sourcecode, and
>> you will know what I mean!)
>
>I think I'd know what you mean if I understood german a bit better! :-)
>
>I understand "käse" and "gross", and it didn't get me a large extra
>cheese pizza at the Pizza Hut in Stuttgart, even if the manager spoke
>the two tongues I speak (or at least, claimed to!).
>
>All this to say: what's your problem exactly? You want the time of the
>day? Algorithms to time events together?

You are right, I should explain.

The first thing I need is delay(long n).
delay should wait for n milliseconds. (thousands of a second)

The next thing I need is a constant framerate for my video player (it
plays .flc and .fli videos) I need for example 15 frames per second.
So the loop algorithm I wrote was the following:

Save the current time
Load the frame
Show the frame
And now wait until the current time >= saved time+ 1/15 second
Repeat the whole thing until all frames are shown.

How can I realize this timing strategy in Linux?

While playing the above way, it should be possible to skip the video
or a sequence of videos by pressing a key on the keyboard. I realized
this under DOS with kbhit(), which i couldn´t find in Linux.
(kbhit is a non-blocking getch)

And the last thing is the Background music. I just forked and updated
mikmod in the background, but it is still playing, when I stop the
program with CTRL+C.


Many greetings,
--
~ Philipp Gühring              p.guehring@poboxes.com
~ http://www.poboxes.com/p.guehring  ICQ UIN: 6588261