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
to reproduce prepare an mp3 called sound.mp3, 10 seconds long. Use the following sketch:
import processing.sound.*;
SoundFile sound;
void setup() {
sound = new SoundFile(this, "sound.mp3");
sound.loop();
}
void draw() {
background(255);
}
void mousePressed() {
// sound.stop(); // does not help the problem
sound.jump(0);
}
Run, wait until the sound starts to play. Click the mouse, observe what happens. Wait a few seconds and click the mouse again, observe what happens.
expected behaviour: with every mouse click, the sound restarts at the start of the song. actual behaviour:
The first mouse click restarts the sound.
Subsequent mouse clicks trigger a new instance of the sound, while older instances continue to play.
The text was updated successfully, but these errors were encountered:
liasomething
changed the title
soundFile.jump(0) not working properly when called at too short intervals
soundFile.jump(0) starts a new instance of the sound, instead of restarting the sound.
Aug 17, 2019
Thanks for reporting, I think this issue should already be resolved with the upcoming version of the Sound library. Could you do me a favour and try installing the following library test build to see if it fixes your issue? https://github.com/processing/processing-sound/releases/download/v2.2.3/sound.zip
Just extract the zip file into your Processing/libraries/ folder, replacing the content of the existing sound/ folder. Please let me know if you run into any troubles, or if the update doesn't fix your issue.
to reproduce prepare an mp3 called
sound.mp3
, 10 seconds long. Use the following sketch:Run, wait until the sound starts to play. Click the mouse, observe what happens. Wait a few seconds and click the mouse again, observe what happens.
expected behaviour: with every mouse click, the sound restarts at the start of the song.
actual behaviour:
The text was updated successfully, but these errors were encountered: