Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rhargreaves committed Sep 6, 2019
1 parent b5b801e commit 1e2c884
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,9 @@ static void updateOperatorTotalLevel(u8 channel, u8 operator)

static u8 effectiveTotalLevel(u8 channel, u8 operator, u8 totalLevel)
{
Channel* chan = getChannel(channel);
if(isOutputOperator(chan->algorithm, operator))
{
return volumeAdjustedTotalLevel(channel, totalLevel);
}
return totalLevel;
return isOutputOperator(getChannel(channel)->algorithm, operator) ?
volumeAdjustedTotalLevel(channel, totalLevel) :
totalLevel;
}

static bool isOutputOperator(u8 algorithm, u8 operator)
Expand Down

0 comments on commit 1e2c884

Please sign in to comment.