Skip to content

Commit

Permalink
Fix track offset issue in csurf_mcu.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ak5k committed Jan 14, 2024
1 parent 0e5d028 commit 0581958
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions reaper-plugins/reaper_csurf/csurf_mcu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,16 @@ class CSurf_MCULive : public IReaperControlSurface
return true;
}

auto isMaster = false;
if (tid == 8)
{
tid = 0; // master offset, master=0
isMaster = true;
}
else
{
tid += GetBankOffset();
}

MediaTrack* tr = CSurf_TrackFromID(tid, g_csurf_mcpmode);

Expand All @@ -447,8 +453,9 @@ class CSurf_MCULive : public IReaperControlSurface
return true;
}

m_fader_pos[tid - GetBankOffset() ? tid - GetBankOffset() : 8] =
faderVal;
m_fader_pos[isMaster ? 8 : tid - GetBankOffset()] = faderVal;

// m_fader_pos[tid] = faderVal;

double val{0};
if (m_flipmode)
Expand Down

0 comments on commit 0581958

Please sign in to comment.