You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where LOOP_CONTINUOUSLY is equal to -1. In the case where getLoopCount() == LOOP_CONTINUOUSLY, this is saying:
for (int loop = 0; loop < -1 + 1; loop = loop) {
clearly, this means that the code in the for loop never executes, since loop is always 0 and 0 < 0 is false.
I think this line should be:
for (
int loop = 0; // initialize at 0
loop < getLoopCount + 1 || getLoopCount() == LOOP_CONTINUOUSLY; // keep going if set to loop continuously
loop++ // iterate up in increments of 1, as standard
)
The text was updated successfully, but these errors were encountered:
chriscoomber
changed the title
Synthesizer's implementation of LOOP_CONTINUOUSLY doesn't work
Sequencer's implementation of LOOP_CONTINUOUSLY doesn't work
Jun 24, 2020
The code it uses to iterate over the loops is here:
(https://github.com/kshoji/javax.sound.midi-for-Android/blob/develop/javax.sound.midi/src/jp/kshoji/javax/sound/midi/impl/SequencerImpl.java#L308)
where
LOOP_CONTINUOUSLY
is equal to-1
. In the case wheregetLoopCount() == LOOP_CONTINUOUSLY
, this is saying:clearly, this means that the code in the
for
loop never executes, sinceloop
is always0
and0 < 0
is false.I think this line should be:
The text was updated successfully, but these errors were encountered: