Skip to content

Commit

Permalink
Tidy code
Browse files Browse the repository at this point in the history
  • Loading branch information
gvnnz committed Jul 22, 2023
1 parent 6b58a88 commit f8f34f1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ Renderer::Renderer(Sequencer& s, Mixer& m, PluginHost& ph)
{
}

/* -------------------------------------------------------------------------- */

void Renderer::render(mcl::AudioBuffer& out, const mcl::AudioBuffer& in, const model::Model& model) const
{
/* Clean up output buffer before any rendering. Do this even if mixer is
Expand Down Expand Up @@ -147,12 +149,16 @@ void Renderer::renderNormalChannels(const std::vector<Channel>& channels, mcl::A
c.render(&out, &in, hasSolos, seqIsRunning);
}

/* -------------------------------------------------------------------------- */

void Renderer::renderMasterIn(const Channel& ch, mcl::AudioBuffer& in) const
{
if (ch.plugins.size() > 0)
m_pluginHost.processStack(in, ch.plugins, nullptr);
}

/* -------------------------------------------------------------------------- */

void Renderer::renderMasterOut(const Channel& ch, mcl::AudioBuffer& out) const
{
ch.shared->audioBuffer.set(out, /*gain=*/1.0f);
Expand All @@ -161,6 +167,8 @@ void Renderer::renderMasterOut(const Channel& ch, mcl::AudioBuffer& out) const
out.set(ch.shared->audioBuffer, ch.volume);
}

/* -------------------------------------------------------------------------- */

void Renderer::renderPreview(const Channel& ch, mcl::AudioBuffer& out) const
{
assert(ch.samplePlayer);
Expand Down

0 comments on commit f8f34f1

Please sign in to comment.