Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
waiting for avi to finish, please help #451389
05/05/15 13:29
05/05/15 13:29
Joined: Feb 2006
Posts: 52
C
carlpa Offline OP
Junior Member
carlpa  Offline OP
Junior Member
C

Joined: Feb 2006
Posts: 52
I am working on a project for medical research. This is a reaction time study. The beginning is for inputinging test id. This is to be followed by an instructional avi. media_play is a background process and following instructions continue without waiting for the end of the avi, I know there are prior posts on this problem. There are so many posts in this forum that I don't know where to look. Can anyone direct me to the appropriate post? I need my test complete by June 1 as I hope to take it to China.

Thank you.


Researcher & clinician. A6, A7, & A8
First computer a Commodore Pet
Re: waiting for avi to finish, please help [Re: carlpa] #451390
05/05/15 13:44
05/05/15 13:44

M
Malice
Unregistered
Malice
Unregistered
M



There is no time stamp seeking in media_play. So I would break the avi into many small avi's and look at checking media_playing var.

But I am not sure I understand what the problem is and what you would like to achieve.

Re: waiting for avi to finish, please help [Re: ] #451392
05/05/15 14:34
05/05/15 14:34
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Dont use media_play
The quality is shit and its not multithreaded loading
-> You cant do anything while you play the video without resulting in nervy lags

Take a look at the Bink player and some rip-ofs

Re: waiting for avi to finish, please help [Re: Ch40zzC0d3r] #451400
05/05/15 16:21
05/05/15 16:21
Joined: Feb 2006
Posts: 52
C
carlpa Offline OP
Junior Member
carlpa  Offline OP
Junior Member
C

Joined: Feb 2006
Posts: 52
Thanks to all of you. The introduction function begins with enter ID, Enter age, etc. Then an avi. The avi is very simple, brief instructions on how and where to place the cursor and click.

My thought is to time the avi, then
media_play (...);
wait(-4);

in main: wait_for(introduction) to keep any other functions waiting. A good idea?
one simple solution?


Researcher & clinician. A6, A7, & A8
First computer a Commodore Pet
Re: waiting for avi to finish, please help [Re: carlpa] #451401
05/05/15 16:36
05/05/15 16:36

M
Malice
Unregistered
Malice
Unregistered
M



Ch40zzC0d3r gives the best advice.

However

Code:
var mhandle =0;

function play_vid()
{
 mhandle = media_play(.....AVI);
while(media_playing(mhandle)){wait(1);}
... other actions to fallow....
}


Re: waiting for avi to finish, please help [Re: ] #451429
05/06/15 00:14
05/06/15 00:14
Joined: Feb 2006
Posts: 52
C
carlpa Offline OP
Junior Member
carlpa  Offline OP
Junior Member
C

Joined: Feb 2006
Posts: 52
Dear Malice,

Your suggestion worked. You have taught me a valuable trick. It also made me feel foolish not to have seen it. Thank you very much.


Researcher & clinician. A6, A7, & A8
First computer a Commodore Pet
Re: waiting for avi to finish, please help [Re: carlpa] #451430
05/06/15 00:30
05/06/15 00:30

M
Malice
Unregistered
Malice
Unregistered
M



Sure thing, your welcome.

Good luck on your project.
Mal


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1