When I pause the movie with movie.pause(), why the sound keeps playing?
in
Core Library Questions
•
2 years ago
How I can control the sound with Movie Class?
This is my code:
import processing.video.*;
Movie myMovie;
boolean turn_on;
void setup() {
frameRate(24);
size(720, 480, P2D);
myMovie = new Movie(this, "test_video.mov");
myMovie.loop();
}
void draw() {
image(myMovie, 0, 0);
}
void mousePressed() {
if (turn_on==false) {
//fill(0);
//rect(0,0,width,height);
myMovie.pause();
turn_on=true;
}
else if (turn_on==true) {
myMovie.loop();
turn_on=false;
}
}
void movieEvent(Movie m) {
m.read();
}
The sound is not turned off when I pause the movie.
2