Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Audio

$
0
0
I'm actually using the GSVideo library, but I assumed they functioned the same.

The problem is the audio, not the video. The video changes fine the keyPress but the audio carries on playing.

Here's my code: Any Ideas?

  1. import codeanticode.gsvideo.*;

  2. GSMovie player;

  3. //global variables
  4. int direction;

  5. public void setup() {
  6.   size(640, 480);
  7.   background(0);
  8.   
  9.   // GSvideo setup
  10.   player = new GSMovie(this, "tdogg.mov");
  11.   player.loop();
  12. }

  13. void draw() {
  14.   image(player, 0, 0, width, height);
  15. }
  16.   
  17. void keyPressed() {
  18.   
  19.   if (key == '1') {  player = new GSMovie (this, "tdogg.mov");} 
  20.   if (key == '2') {  player = new GSMovie (this, "transit.mov");}
  21.   if (key == '3') {  player = new GSMovie (this, "bunny.mov");}
  22. }

  23. void movieEvent(GSMovie player) {
  24.   player.read();
  25. }

Viewing all articles
Browse latest Browse all 1768

Trending Articles