is it safe to call at the same time in two separated threads this:
// Let's say in AudioProcessor::precessBlock() myTempAudioBuffer.copyFrom(ch1, start1, audioBufferInProcessBlock, ch1, start2, numSamples1); // And now at the same time in message thread bufToUseInMessageThread.copyFrom(ch2, start3, myTempAudioBuffer, ch2, start4, numSamples2);
And also the same question is about
AbstractFifo. I mean what happen if I call:
// in processBlock myAbstractFifo.prepareToWrite (numSamples1, start1, block1, start2, block2); // And exactly at the same time in message thread myAbstractFifo.finishedRead(sizeOfBlock);
As you can see I need to collect data in
AudioProcessor::processBlock() and then use that data in message thread. And not sure how to do that properly. I thought about something like
AudioBuffer<std::atomic<float>> but of course it doesn’t work with
copyFrom() and things like that.
For any help great thanks in advance.