File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -321,16 +321,29 @@ void LfpDisplayNode::process (AudioBuffer<float>& buffer)
321321 initializeEventChannels ();
322322 checkForEvents ();
323323 finalizeEventChannels ();
324+ auto isStreamDisplayed = [this ] (uint16 streamId)
325+ {
326+ for (auto split : splitDisplays)
327+ {
328+ if (split != nullptr && split->isVisible () && split->selectedStreamId == streamId)
329+ return true ;
330+ }
331+
332+ return false ;
333+ };
324334
325335 for (int chan = 0 ; chan < buffer.getNumChannels (); ++chan)
326336 {
327337 const uint16 streamId = continuousChannels[chan]->getStreamId ();
338+ if (! isStreamDisplayed (streamId))
339+ continue ;
328340
329- const uint32 nSamples = getNumSamplesInBlock (streamId);
330-
331- String streamKey = getDataStream (streamId)-> getKey () ;
341+ auto displayBufferIt = displayBufferMap. find (streamId);
342+ if (displayBufferIt == displayBufferMap. end () || displayBufferIt-> second == nullptr )
343+ continue ;
332344
333- displayBufferMap[streamId]->addData (buffer, chan, nSamples);
345+ const uint32 nSamples = getNumSamplesInBlock (streamId);
346+ displayBufferIt->second ->addData (buffer, chan, nSamples);
334347 }
335348}
336349
You can’t perform that action at this time.
0 commit comments