Skip to content

Commit

Permalink
Remove redundant frames variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Aug 12, 2024
1 parent b7963c7 commit 4ff2725
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/audio/AudioPortAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,12 @@ int AudioPortAudio::processCallback(const float* inputBuffer, float* outputBuffe
{
if( m_outBufPos == 0 )
{
const fpp_t frames = getNextBuffer(m_outBuf.get());
if( !frames )
m_outBufSize = getNextBuffer(m_outBuf.get());
if (m_outBufSize == 0)
{
std::fill_n(outputBuffer, framesPerBuffer * channels(), 0.0f);
return paComplete;
}
m_outBufSize = frames;
}

const auto minLen = std::min(framesPerBuffer, m_outBufSize - m_outBufPos);
Expand Down

0 comments on commit 4ff2725

Please sign in to comment.