Skip to content

Commit

Permalink
fixed Photron CPU issue for now #13
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremymuller committed Nov 9, 2020
1 parent 82ffa95 commit 35d65da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Photron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ struct Photron : Module {
dsp::SchmittTrigger colorTrig, invertTrig, resetTrig;
bool isColor = true;
int resetIndex = 0;
int srIncrement = APP->engine->getSampleRate() / INTERNAL_HZ;
int srIncrement = static_cast<int>(APP->engine->getSampleRate() / INTERNAL_HZ);
// int srIncrement = 735;
int sr = 0;
static const int cols = DISPLAY_SIZE_WIDTH / CELL_SIZE;
Expand Down Expand Up @@ -379,7 +379,8 @@ struct Photron : Module {
}
}
}
sr = (sr+1) % srIncrement;
sr++;
if (sr > srIncrement) sr = 0;
}

void resetBlocks() {
Expand Down

0 comments on commit 35d65da

Please sign in to comment.