pouët.net

Go to bottom

synchro issue (music start before visual)

category: code [glöplog]
 
HEI people!

I am finishing my next release but I still have the same problem, the music (a v2m using a classic non-modified version of v2 lib) is starting when the intro is launched but the visual start some seconds after (time is variable, and can change randomly at each launch on the same computer).

Visually, it seems that the "window" isn't yet started/initialized but the music is already playing.

the "play" function of V2 is called in the same "main" loop who is used to draw everything, so I don't understand why the sync is fucked up :(

there is a way to wait the full end of windows init to be sure that the music will start when visuals are "ready"?

how do you do people? :|

remember, I am le very lame at all that "system" coding :(
added on the 2012-03-19 12:07:54 by rez rez
Looking forward to your demo Rez! Vote disk is defo my fave from last year :)
added on the 2012-03-19 12:16:42 by djh0ffman djh0ffman
Try rendering the first frame, then start the music, then display the demo.
added on the 2012-03-19 12:22:18 by LLB LLB
yeah sure, but HOW i can know that the first frame is rendered? :D

what is the "trigger" ? how to catch it?
added on the 2012-03-19 13:50:23 by rez rez
perhaps i can do a play, then stop, then play again some seconds later to be sure that everything is ready?
added on the 2012-03-19 13:51:19 by rez rez
What I suggested:
Code: // draw first frame draw(); SwapBuffers(...); // start music startV2(); // display my awesome demo while (true) { processMessages(); draw(); SwapBuffers(...); }
added on the 2012-03-19 14:00:16 by LLB LLB
hmmm... sounds interesting, I will try something like that :)
added on the 2012-03-19 14:10:07 by rez rez

login

Go to top