Skip to content

Commit

Permalink
Remove redundant fifoWriter::write function
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Sep 21, 2023
1 parent cfa70de commit defb9f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 0 additions & 2 deletions include/AudioEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,6 @@ class LMMS_EXPORT AudioEngine : public QObject
volatile bool m_writing;

void run() override;

void write( surroundSampleFrame * buffer );
} ;


Expand Down
13 changes: 2 additions & 11 deletions src/core/AudioEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1273,20 +1273,11 @@ void AudioEngine::fifoWriter::run()
auto buffer = new surroundSampleFrame[frames];
const surroundSampleFrame * b = m_audioEngine->renderNextBuffer();
memcpy( buffer, b, frames * sizeof( surroundSampleFrame ) );
write( buffer );
m_fifo->write(buffer);
}

// Let audio backend stop processing
write( nullptr );
m_fifo->write(nullptr);
m_fifo->waitUntilRead();
}




void AudioEngine::fifoWriter::write( surroundSampleFrame * buffer )
{
m_fifo->write(buffer);
}

} // namespace lmms

0 comments on commit defb9f2

Please sign in to comment.