processing / processing-sound

Audio library for Processing built with JSyn
https://processing.org/reference/libraries/sound/
GNU Lesser General Public License v2.1
149 stars 50 forks source link

.isPlaying() always returns true #39

Closed aidanhasaknife closed 5 years ago

aidanhasaknife commented 5 years ago

.isPlaying() always returns true, even after the SoundFile has ended. In the following code, the else is never executed. Processing 3.5,3 Processing Sound Library 2.2.0

import processing.sound.*;
SoundFile meow;

void setup() {   
  meow = new SoundFile(this, "hamburger.wav");
  meow.play();
}      

void draw() {    
  if(meow.isPlaying() == true)
  {
    println("playing");
  } else  
  {
    println("not playing");
  }
}
kevinstadler commented 5 years ago

Thanks for reporting, I'll have a look at it

kevinstadler commented 5 years ago

@Aidan-Lineberry this should be fixed with version 2.2.2. If you want you can immediately download the new version from here: https://github.com/processing/processing-sound/releases/tag/v2.2.2 simply extract the sound.zip file into your Processing/libraries folder (overwriting the existing sound/ folder), otherwise the new version should become available for auto-update through Processing's contribution manager within a week at most.

Thanks again for reporting!