Of course, it can run slightly longer. It shouldn't affect the measurement, only increase a wait time of analyzing. And it also brings noticeable delay when I will use AUDIO IN as an oscilloscope.
Stop recording sooner would be perfect, unless it is difficult to implement.
I made this code yesterday:
bool MyRecorder::OnProcessSamples(const sf::Int16* Samples, std::size_t SamplesCount) {
buffer.LoadFromSamples(Samples, this->samplesCount, 1, 44100);
return false;
}
Did you mean it this way? Only imperfection is that it takes minimally one second.