Skip to content

Commit

Permalink
Fixed struct alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
kittybupu committed Sep 19, 2022
1 parent f47a251 commit 15ba878
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openVCB.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ namespace openVCB {
// This is for asyncronous exchange of data
// for stuff like audio and signal scopes
struct InstrumentBuffer {
int idx;
int16_t* buffer;
int bufferSize;
int idx;
};

class Project {
Expand Down
8 changes: 4 additions & 4 deletions openVCBSim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace openVCB {
for (size_t i = 0; i < numTicks; i++) {
if (events > maxEvents) return i;

for (auto& inst : instrumentBuffers)
for (auto& inst : instrumentBuffers)
inst.buffer[tickNum % inst.bufferSize] = states[inst.idx].activeInputs;

tickNum++;
Expand Down Expand Up @@ -155,12 +155,12 @@ namespace openVCB {
nxtInk == Ink::XorOff || nxtInk == Ink::XnorOff)
tryEmit(nxtId);
}
}
}

// Swap buffer
std::swap(updateQ[0], updateQ[1]);
}
}
return numTicks;
}
return numTicks;
}
}

0 comments on commit 15ba878

Please sign in to comment.