Infinite loop?

edited November 2017 in Library Questions

I'm working on an audio sample machine using minim. I want one player to pause another and I've gotten the timer to stop but does anyone know why this snippet causes a loop my app can't get out of?.

while(Ads[i].isPlaying()){
        if (Ads[i].position()==Ads[i].length()) {
        Ads[i].pause();
        }
       savedTime=millis();
     }

Answers

  • Please check the keyword: draw() under the reference section in the Processing website. You should consider also checking the examples that comes with the minim library. You will see that using a while is not proper in Processing and not used very often.

    We don't know what Ads is in your code. In your case, it is better if you provide an MCVE.

    Kf

Sign In or Register to comment.