Hi,
i'm struggling to completely mute movie clips. Here's the code (I guess the problem lies in the new_movie() function at the bottom):
import processing.video.*;
Movie movie;
String[] filenames;
void setup() {
size(640, 480);
java.io.File folder = new java.io.File(dataPath("C:\\Users\\Marin\\Downloads\\clips"));
filenames = folder.list();
frameRate(30);
new_movie();
}
void draw() {
if (movie.time() >= movie.duration()) {
new_movie();
}
if (movie.available()) {
movie.read();
background(0);
image(movie, 0, 0);
}
}
void new_movie() {
int newmovid = int(random(filenames.length));
movie = new Movie(this, "C:\\Users\\Marin\\Downloads\\clips\\" + filenames[newmovid]);
movie.play();
movie.volume(0);
}
Setting the volume before movie.play() has no effect (the whole clip plays at full volume) and removing the soundtrack from 1000+ mp4 files doesn't sound very optimal.
What should I do?
Thanks!