Merge pull request #382 from cam900/patch-8

Further fix looped sample preview
This commit is contained in:
tildearrow 2022-04-20 14:15:32 -05:00 committed by GitHub
commit f18f2968bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1137,7 +1137,8 @@ void FurnaceGUI::drawSampleEdit() {
ImU32 centerLineColor=ImAlphaBlendColors(bgColor,ImGui::GetColorU32(ImGuiCol_PlotLines,0.25)); ImU32 centerLineColor=ImAlphaBlendColors(bgColor,ImGui::GetColorU32(ImGuiCol_PlotLines,0.25));
for (int i=0; i<availY; i++) { for (int i=0; i<availY; i++) {
for (int j=0; j<availX; j++) { for (int j=0; j<availX; j++) {
if (sample->loopStart>=0 && sample->loopStart<(int)sample->samples && ((j+samplePos)*sampleZoom)>sample->loopStart) { int scaledPos=samplePos+(j*sampleZoom);
if (sample->loopStart>=0 && sample->loopStart<(int)sample->samples && scaledPos>=sample->loopStart) {
data[i*availX+j]=bgColorLoop; data[i*availX+j]=bgColorLoop;
} else { } else {
data[i*availX+j]=bgColor; data[i*availX+j]=bgColor;