AUDIO: Simplify iterating backwards over an array.
This commit is contained in:
parent
3ee307e6b3
commit
d1688d22d4
1 changed files with 2 additions and 2 deletions
|
@ -707,8 +707,8 @@ int8 MaxTrax::noteOn(ChannelContext &channel, const byte note, uint16 volume, ui
|
|||
if ((channel.flags & ChannelContext::kFlagMono) == 0) {
|
||||
voiceNum = pickvoice((channel.flags & ChannelContext::kFlagRightChannel) != 0 ? 1 : 0, pri);
|
||||
} else {
|
||||
VoiceContext *voice = ARRAYEND(_voiceCtx) - 1;
|
||||
for (voiceNum = ARRAYSIZE(_voiceCtx) - 1; voiceNum >= 0 && voice->channel != &channel; --voiceNum, --voice)
|
||||
VoiceContext *voice = ARRAYEND(_voiceCtx);
|
||||
for (voiceNum = ARRAYSIZE(_voiceCtx); voiceNum-- != 0 && --voice->channel != &channel;)
|
||||
;
|
||||
if (voiceNum < 0)
|
||||
voiceNum = pickvoice((channel.flags & ChannelContext::kFlagRightChannel) != 0 ? 1 : 0, pri);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue