AudioJack: Fix segfault for some bufsizes

The segfault happens when you use buffersize 224: Then, in
AudioJack.cpp, L424, `done` can be greater than `_nframes`.
This commit is contained in:
Johannes Lorenz
2023-10-01 16:51:27 +02:00
committed by Johannes Lorenz
parent cd018c04ff
commit 54cc4cf1e9

View File

@@ -390,7 +390,7 @@ int AudioJack::processCallback( jack_nframes_t _nframes, void * _udata )
while( done < _nframes && m_stopped == false )
{
jack_nframes_t todo = std::min<jack_nframes_t>(
_nframes,
_nframes-done,
m_framesToDoInCurBuf -
m_framesDoneInCurBuf);
const float gain = audioEngine()->masterGain();