Files
processing4/java/libraries/video/examples/Player/Audio/Audio.pde
2011-06-18 16:27:28 +00:00

27 lines
545 B
Plaintext

/**
* Audio.
* Audio playback using the GSPlayer object.
* By Ryan Kelln
*
* Move the cursor across the screen to change volume.
*/
import codeanticode.gsvideo.*;
GSPlayer sample;
void setup() {
size(100, 100);
// The last parameter is used to indicate the stream type:
// VIDEO (default), AUDIO or DATA.
sample = new GSPlayer(this, "groove.mp3", GSVideo.AUDIO);
sample.loop();
}
void draw()
{
//sample.jump(float(mouseY) / height * sample.duration());
sample.volume(float(mouseX) / width);
}