minim replay issue
in
Core Library Questions
•
2 years ago
hi guys,
i am using mimin to load a mp3 snippet (< 1sec) into processing to then play them in an regular rythm depending on some events.
I load the mp3 in the void setup() part and then play it each second within a if() within the void draw() part.
This works fine for a couple of seconds then the samples doesn't start from the beginning anymore or repeats unwanted.
this is the part within the void draw() (using cue to start from the beginning, then play, then delay for the length of the mp3 and then rewind). I already tried without cue & rewind but it doesn't change anything:
- int sec = second();
- if(sec != secOld){
- player.cue(1);
- player.play();
- delay(player.length());
- player.rewind();
- }
- secOld = sec;
Thanks for any help or pointer towards help!
1