Skip to content

Commit

Permalink
docs: explain ByteBeat::next logic
Browse files Browse the repository at this point in the history
  • Loading branch information
midouest committed Feb 26, 2021
1 parent c3ada57 commit 4265bde
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/ByteBeat/ByteBeat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ namespace ByteBeat
int t = tBuf[i];
float sample;

// In most cases, the t input will change slower than the sample
// rate. Save some cycles by only evaluating the expression when
// t changes.
if (t == mPrevT)
{
sample = mPrevSample;
Expand Down

0 comments on commit 4265bde

Please sign in to comment.