Silence audio outputs wen objects have timed out

This commit is contained in:
Alex Harker
2019-08-31 21:00:54 +01:00
parent 2f6da499aa
commit a69480c66e
3 changed files with 12 additions and 2 deletions
+4
View File
@@ -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);
+4 -1
View File
@@ -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
+4 -1
View File
@@ -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