Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with loop(int num) #97

Open
matinlotfali opened this issue Jun 17, 2019 · 0 comments
Open

issue with loop(int num) #97

matinlotfali opened this issue Jun 17, 2019 · 0 comments

Comments

@matinlotfali
Copy link

The mp3 file here loops 2 times with loop(3), indefinite times with loop(4), and 3 times with loop(5)

Minim version: 2.2.2
Installed with Processing 3.5.3

Here is my code:

int time = 10*60 + 1;
void setup()
{
  size(400, 400);
  minim = new Minim(this);
  player = minim.loadFile("alarm.mp3");
  frameRate(10);
}

void draw()
{
  if (frameCount%10 == 0 && time > 0)
  {
    time--;
    if (time % 60 == 0)  //check second
      if (time / 60 == 10 || time / 60 == 5 || time == 0) //check minute
        player.loop(5);
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant