-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
when I want to play nine movies with different speed which depend on valt[].movies can play normally but nineth movie,An error message was popped up: JNA:could not detach thread.I am sure valr[8] is right and b8 is same with other 8 mp4s . as for whether my computer has enough resources to play nine movies,i am not sure.but i run this sketch in other two computers,then same problem happened.So i guess maybe it's a bug.Maybe i am wrong.but indeed I can't solve it by searching(I already did it).
my computer system is window10.and the vision of my processing is 3.3.5 and I update it to 3.3.6,but,the wrong as before.Codes is here also in the attached file.
`import processing.video.;
import processing.serial.;
Serial myPort;
int[] valr={1021,1021,1021,1021,1021,1021,1021,1021,1021};
Movie[] endmovie = new Movie[9];
void setup(){
fullScreen();
for(int i = 0;i<9;i++){
endmovie[i] = new Movie(this,"b"+i+".mp4");
}
myPort = new Serial(this,Serial.list()[0], 9600);
myPort.bufferUntil('\n'); //buffer until meet '\n', then call the event listener
}
void draw(){
image(endmovie[0],0,0,width/3,height/3);
image(endmovie[1],width/3,0,width/3,height/3);
image(endmovie[2],width2/3,0,width/3,height/3);
image(endmovie[3],0,height/3,width/3,height/3);
image(endmovie[4],width/3,height/3,width/3,height/3);
image(endmovie[5],width2/3,height/3,width/3,height/3);
image(endmovie[6],0,height2/3,width/3,height/3);
image(endmovie[7],width/3,height2/3,width/3,height/3);
image(endmovie[8],width2/3,height2/3,width/3,height/3);
for(int i = 0;i<9;i++){
endmovie[i].play();
if(valr[i]>500){
endmovie[i].speed(1.0);
}else{
endmovie[i].speed(-1.0);
}
}
}
void movieEvent(Movie m){
m.read();
}
void serialEvent(Serial p) {
String inString = p.readString();
print(inString);
if(inString!=null){
String[] rec= split(inString, ',');
for(int i=0;i<9;i++){
valr[i]=int(rec[i]);
}
}
}
try7.zip
`