processing-sound-archive icon indicating copy to clipboard operation
processing-sound-archive copied to clipboard

.isPlaying() always returns 1

Open francescosoave opened this issue 7 years ago • 2 comments

as per title, .isPlaying() always returns integer 1 even after the SoundFile has ended. In the following code, the else is never executed. Processing 3.3.7, sound library version 1.4.0

import processing.sound.*;
SoundFile f;

void setup() {   
  f = new SoundFile(this, "/samples/sample02.mp3");
  f.play();
}      

void draw() {    
  if(f.isPlaying() == 1)
    println("playing: " + f.isPlaying());
  else  
    println("ended " + f.isPlaying());
}

francescosoave avatar Mar 25 '18 00:03 francescosoave

I found this to be a problem too. I'm trying to sequence three sounds together, starting the next as soon as the previous is done. Using isPlaying() would be the right way to do this, but it doesn't work because of this bug.

borogoves avatar Oct 13 '18 23:10 borogoves

I am having the same problem as of Oct 23, 2018. Always 1.

mdecoster avatar Oct 24 '18 01:10 mdecoster