Flush audio buffers


#1

I would like to know if there is a way to flush the audio accumulated in the driver buffers when stopping the audio.

To explain in more details what I mean: At the moment I call AudioDeviceManager:: removeAudioCallback, there is some audio accumulated due to latency, is there a way to get this audio before getting the event audioDeviceStopped()?

Thank you,


#2

No…

It’s a very strange question to ask, and generally when people ask strange questions, it means they’re thinking about a problem in the wrong way. Maybe explain what you’re actually trying to achieve instead?


#3

Thank you very much Jules for the prompt answer.

We are trying to make sure that when we stop the audio capture, all the audio that is in transit in JUCE and the lower layers gets to the application. This audio is essentially due to the latency.


#4

Yes, I understood that. I’m asking why you want to do this?

If you’re afraid of losing the last few milliseconds of audio, then surely you could just stop recording a few milliseconds later?