Silence audio outputs wen objects have timed out
This commit is contained in:
@@ -160,6 +160,10 @@ protected:
|
||||
void addParameterInput();
|
||||
void setOutputType(unsigned long idx, FrameType type);
|
||||
|
||||
// Test to see if processing is currently suspended
|
||||
|
||||
bool isTimedOut() { return mProcessingQueue->isTimedOut(); }
|
||||
|
||||
// You should only call this from your process method (it is unsafe anywhere else)
|
||||
|
||||
void setCurrentOutputType(unsigned long idx, FrameType type);
|
||||
|
||||
@@ -109,8 +109,11 @@ void FrameLib_Sink::blockProcess(const double * const *ins, double **outs, unsig
|
||||
{
|
||||
// Safety
|
||||
|
||||
if (blockSize > bufferSize())
|
||||
if (blockSize > bufferSize() || isTimedOut())
|
||||
{
|
||||
zeroVector(outs[0], blockSize);
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate first segment size and copy segments
|
||||
|
||||
|
||||
@@ -140,8 +140,11 @@ void FrameLib_Trace::blockProcess(const double * const *ins, double **outs, unsi
|
||||
{
|
||||
// Safety
|
||||
|
||||
if (blockSize > bufferSize())
|
||||
if (blockSize > bufferSize() || isTimedOut())
|
||||
{
|
||||
zeroVector(outs[0], blockSize);
|
||||
return;
|
||||
}
|
||||
|
||||
// Calculate first segment size and copy segments
|
||||
|
||||
|
||||
Reference in New Issue
Block a user