Skip to content

Commit

Permalink
Simple smoothing of CPU (#1224)
Browse files Browse the repository at this point in the history
so at least it doesnt' flicker as much.

So-so implementation. Sure we will tweak this before 1.0
  • Loading branch information
baconpaul authored Aug 30, 2024
1 parent 53e912e commit 87577b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ bool Engine::processAudio()
// auto pct = time_span.count / maxtime;
// or...
auto pct = time_span.count() * sampleRate * blockSizeInv * 100.0;
sharedUIMemoryState.cpuLevel = pct;
sharedUIMemoryState.cpuLevel = std::max(sharedUIMemoryState.cpuLevel * 0.9995, pct);
return true;
}

Expand Down

0 comments on commit 87577b6

Please sign in to comment.