Skip to content

Commit

Permalink
fix dejavu seed input not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Stubs42 committed Dec 17, 2021
1 parent 54b33b1 commit 44da5c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"slug": "OrangeLine",
"name": "OrangeLine",
"version": "1.3.9",
"version": "1.3.11",
"license": "GPL-3.0-only",
"brand": "",
"author": "Dieter Stubler",
Expand Down
8 changes: 4 additions & 4 deletions src/Dejavu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,19 +475,19 @@ void processOutputChannels() {
initializerepeatRandomGenerators
Set all counters to 0 on reset
*/
long getGlobalSeed() {
float seed = 0;
unsigned long getGlobalSeed() {
unsigned long seed = 0;
if (getInputConnected (SEED_INPUT)) {
float seedFloat = getStateInput (SEED_INPUT) * SEED_INPUT_SCALE;
if (seedFloat < 0)
seedFloat *= -1;
unsigned long seed = (unsigned long)seedFloat;
seed = (unsigned long)seedFloat;
if (seed > SEED_MAX)
seed = SEED_MAX;
setStateParam (SEED_PARAM, float(seed));
}
else
seed = getStateParam (SEED_PARAM);
seed = (unsigned long)getStateParam (SEED_PARAM);
return seed;
}

Expand Down

0 comments on commit 44da5c4

Please sign in to comment.