int DrawGLScene()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
//The starting screen
if(screen == -1)
{
if(startup_snd == 0)
{
// Sleep(5000);
PlaySound("intro.wav", NULL, SND_FILENAME | SND_ASYNC);
startup_snd=1;
}
startscene(); //Start scene is a function so I won''t have to go through the stuff once I''m done.
if(fade < 1.0)
{
fade=fade+0.001;
}
if(fade > 1.0)
{
cue=cue+0.001;
}
if(cue > 4.0)
{
screen=0;
}
}
Cueing with music
Hello, is there anyway to cue your OpenGL graphics with music? I have tried to place a counter within the program to keep track of how many frams have passed before an execution, but sometimes the execution is too fast or too slow.
Example:
This is fairly dependable but once in a while, it skews off to fast or too slow.
You do know this is an OpenGL forum, Graphics API....
That is absolutley out of subject.
But then egain, it does have a little....
Have you ever thought of looking into Multi Threaded Programs...
There are definatley other solutions, but this is the only one that comes ot mind atm.
[edited by - Smokey97 on April 1, 2003 2:49:21 AM]
That is absolutley out of subject.
But then egain, it does have a little....
Have you ever thought of looking into Multi Threaded Programs...
There are definatley other solutions, but this is the only one that comes ot mind atm.
[edited by - Smokey97 on April 1, 2003 2:49:21 AM]
Take a look at the FMOD audio library. It supports an wav format that can embed audio cues.
quote:
You do know this is an OpenGL forum, Graphics API....
That is absolutley out of subject.
How is it absolutly out of the subject? Don''t games have synced cinematic sequences that weren''t pre-recorded? If you wanted to have a game make a sound after some point of activation and change to another pitch while activating another command, wouldn''t you want it to be synchronized?!? Not resulting in a two second delay either way because your computer was doing something at the moment or somewhat.
the way to do it is to keep track of the time, not the frames.
It''s pretty simple to write your own class that can keep track of time, and timebased movements (instead of framebased) makes the program run the same on another computer
It''s pretty simple to write your own class that can keep track of time, and timebased movements (instead of framebased) makes the program run the same on another computer
How is it absolutly out of the subject? Don''t games have synced cinematic sequences that weren''t pre-recorded?
It is out of the subject because this is a Graphics API forum, not a game dev forum...
But i''m not a moderator (yet :evil grin so dont listen to me.
It is out of the subject because this is a Graphics API forum, not a game dev forum...
But i''m not a moderator (yet :evil grin so dont listen to me.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement