Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to optimise OPAL #291

Merged
merged 8 commits into from
Jan 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean up debug perf logging code
  • Loading branch information
maks committed Jan 2, 2025
commit e0a83e581e8d3835e19b04001065efb44e81f7a2
7 changes: 1 addition & 6 deletions sources/Application/Instruments/OpalInstrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ void OpalInstrument::Stop(int c) {
opl_.Port(OCTAVE_BASE_REG, stop);
};

static int debugCount = 0;

bool OpalInstrument::Render(int channel, fixed *buffer, int size,
bool updateTick) {

Expand All @@ -152,10 +150,7 @@ bool OpalInstrument::Render(int channel, fixed *buffer, int size,
opl_.SampleBuffer(buffer, size);

int took = micros() - start;
debugCount++;
if (debugCount % 100 == 0) {
Trace::Log("OPALINSTRUMENT", "Render took: %i us [%i])", took, size);
}
// Trace::Log("OPALINSTRUMENT", "Render took: %i us [%i])", took, size);
return true;
};

Expand Down