I have a query in the audioDeviceIOCallback.
In the below code, during the audio device callback, im doing (recording and streaming). The file is recorded properly. But the streaming of data from input to output is not working. I am just copying the input buffer to the output buffer. Dont know what I am missing.
void AudioRecorder::audioDeviceIOCallback (const float** inputChannelData, int /*numInputChannels*/,
float** outputChannelData, int numOutputChannels, int numSamples)
const ScopedLock sl (writerLock);
if (activeWriter != nullptr)
activeWriter->write (inputChannelData, numSamples);
// In my case, both input and output channels are in indices 0 and 1. So the if condition shouldnt be a problem
for (int i = 0; i < numOutputChannels; ++i)
memcpy (outputChannelData[i], inputChannelData[i], sizeof (float) * (size_t) numSamples);