jedshiva and mixio have a problem: the vu is displaying values, then you disconnect all the input: VU stays at the same level because work() / multiwork() stops beeing called
how can we find out if work() / multiwork() is called ?
i can't use IsActive because i'm doing this on the native side, and it doesn't go well with my falloff (calulated on native side, sent over with handleguimessage). IsActive is too early for my purpose.
how to detect if work / multiwork is called ?
Re: how to detect if work / multiwork is called ?
How about something like this?
Code: Select all
Work()
{
doneWork = true;
}
Tick()
{
if(doneWork == true)
{
doneWork = false;
/* set a timer here, only needs to be short */
}
}
OnTimerExpired()
{
/* reset display */
}
Re: how to detect if work / multiwork is called ?
IXix wrote:How about something like this?
Code: Select all
Work() { doneWork = true; } Tick() { if(doneWork == true) { doneWork = false; /* set a timer here, only needs to be short */ } } OnTimerExpired() { /* reset display */ }
i think i tried something like this, but the threading got in the way iirc. since i need to read doneWork in HandleGUIMessage. The meter started to flicker..
this is what i did:
Code: Select all
bool miex::HandleGUIMessage(CMachineDataOutput *pout, CMachineDataInput *pin)
{
int request;
pin->Read(request);
switch(request)
{
case 0:
{
if (pmi->UpdateGUI == true)
{
for (dword t = 0; t < pmi->NumTracks; t++)
{
float *sw = pmi->Get_GUI_Values(t);
pout->Write((double)*sw); sw++;
pout->Write((double)*sw); sw++;
pout->Write((double)*sw); sw++;
pout->Write((double)*sw); sw++;
pout->Write((double)*sw); sw++;
pout->Write((double)*sw); sw++;
}
pmi->UpdateGUI = false;
return true;
}
else
{
//this causes flickering on the i7
//pout->Write(0.0);
//pout->Write(0.0);
//pout->Write(0.0);
//pout->Write(0.0);
//pout->Write(0.0);
//pout->Write(0.0);
//pmi->UpdateGUI = false;
//return true;
}
}
}
return false;
};
void MultiWork(float const * const *inputs, float **outputs, int numsamples)
{
....do stuff...
UpdateGUI = true;
}
Re: how to detect if work / multiwork is called ?
No, not really. Sorry.UNZ wrote:any ideas how to solve ?
Re: how to detect if work / multiwork is called ?
maybe there could be a machine flag to tell buzz to always call work() / multiwork() / tick() even if the machine is disconnected from the graph entirely ?