Is it possible to have access to the clock that we can see on skins? (=fullhour)
Or is it possible to have access to the clock of Windows? (...adding new functions for windows in .h)
Endeed I would like to get the time so as to use it in plugins: something like GetParam...
Or is it possible to have access to the clock of Windows? (...adding new functions for windows in .h)
Endeed I would like to get the time so as to use it in plugins: something like GetParam...
geposted Mon 22 Nov 04 @ 12:14 pm
I think we can use:
#include time.h
in the header of the cpp file
with symbols superior and inferior (they don't appear on the forum)
#include time.h
in the header of the cpp file
with symbols superior and inferior (they don't appear on the forum)
geposted Mon 22 Nov 04 @ 8:49 pm
I have created a kind of wake up for VDJ but it freezes Vdj to work.
If someone knows about time program using the library time.h, reply here
(It's not only concerning program for vdj but general C, C++ programs. I mean you don't need to know how to develop plugin for vdj but only know using time.h)
If someone knows about time program using the library time.h, reply here
(It's not only concerning program for vdj but general C, C++ programs. I mean you don't need to know how to develop plugin for vdj but only know using time.h)
geposted Wed 24 Nov 04 @ 2:35 am
Here is my function:
////////////////////
#include time.h>
void wait ( int seconds )
{
clock_t endwait;
endwait = clock () + seconds * CLK_TCK ;
while (clock() < endwait) {}
}
/////////////////
For example: wait(1); equals to 1 second
The problem is that the loop while freezes VDJ. Do you have any ideas to solve that problem?
////////////////////
#include time.h>
void wait ( int seconds )
{
clock_t endwait;
endwait = clock () + seconds * CLK_TCK ;
while (clock() < endwait) {}
}
/////////////////
For example: wait(1); equals to 1 second
The problem is that the loop while freezes VDJ. Do you have any ideas to solve that problem?
geposted Wed 24 Nov 04 @ 3:02 am
Can we do multithreading with VDJ?
I mean one thread for excutions in VDJ and another thread for my function wait()
I mean one thread for excutions in VDJ and another thread for my function wait()
geposted Wed 24 Nov 04 @ 3:23 am
djcel;
I think (not sure) that you can't use clock functions in a VDJ plugin because VDJ gets samples and treat them with the plugin before playing them. (Sorry for my english)
I think (not sure) that you can't use clock functions in a VDJ plugin because VDJ gets samples and treat them with the plugin before playing them. (Sorry for my english)
geposted Wed 24 Nov 04 @ 5:06 am
My idea is to create a new thread (an event) where I put my loop linked to the Windows time.
I have understood multithreading this night (i'm happy to have discovered that because it was very interesting :-) enough for not sleeping) and I have included this code in my plugin. However vdj always freezes but finaly execute the program like without multithreading.
I have understood multithreading this night (i'm happy to have discovered that because it was very interesting :-) enough for not sleeping) and I have included this code in my plugin. However vdj always freezes but finaly execute the program like without multithreading.
geposted Wed 24 Nov 04 @ 5:32 am
djcel: you should NOT use a while() loop to wait out some time... this is EXTREMELY cpu intensive... I know (in C#... I'm pretty sure there is one in C++ too) there is a function to put the thread to sleep for some time, which does not use much CPU at all (thus, no freezing).
I've never done multithreading in C++ though, only in C#... Good luck ;)
macourteau
I've never done multithreading in C++ though, only in C#... Good luck ;)
macourteau
geposted Thu 25 Nov 04 @ 1:17 pm
Do you talk about the function sleep(int) ?
Great idea for the moment but it's not enough for my project
Great idea for the moment but it's not enough for my project
geposted Fri 26 Nov 04 @ 1:21 am
I don't know, you should try... I don't really have time now to test this, sorry :(
macourteau
macourteau
geposted Fri 26 Nov 04 @ 12:38 pm
I need some help for a new plugin Wake Up:
* define 2 hours with date: one to start and the other one to stop
* when the first one is reached, automix starts + option to broadcast on the web
(vdj has to stay open of course to use the plugin ;-) )
* when the second one is reached, sound is stopped + option to close vdj
I'm calling all developers even new ones !! I can help you to adapt a wake up on VDJ if you know how to create a wake up without freezing
* define 2 hours with date: one to start and the other one to stop
* when the first one is reached, automix starts + option to broadcast on the web
(vdj has to stay open of course to use the plugin ;-) )
* when the second one is reached, sound is stopped + option to close vdj
I'm calling all developers even new ones !! I can help you to adapt a wake up on VDJ if you know how to create a wake up without freezing
geposted Sun 09 Jan 05 @ 5:18 pm