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

soundFile.jump(0) starts a new instance of the sound, instead of restarting the sound. #44

Closed
liasomething opened this issue Aug 17, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@liasomething
Copy link

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.
@liasomething 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
@kevinstadler
Copy link
Collaborator

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.

@kevinstadler kevinstadler added the bug Something isn't working label Aug 18, 2019
@liasomething
Copy link
Author

hi kevin,
yes, it's fixed with this version, thanks!!!
:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants