Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

I'm using Minim, and dont know how to make it noloop...Help me.

$
0
0

hi Im writing code with minim.


import ddf.minim.*;

AudioPlayer player;

Minim minim;

int change = 0;

String [] bgm = { "error.wav", "coin.wav"};

void setup(){

minim = new Minim(this);

String [] bgm = { " error.wav", "coin.wav"};

size(500, 500); fill(255);

smooth();

}

void draw(){

noFill();

if (change ==0){

player = minim.loadFile("error.wav");

player.play();

background(255);

strokeWeight(4);

ellipse(width/2, height/2,300,300);

}else if (change == 1){

player = minim.loadFile("coin.wav");

player.play();

background(255);

strokeWeight(40);

fill(random(255),random(255),random(255));

ellipse(width/2, height/2,300,300); } }

void keyPressed(){

if (key == 'm'){

change = change + 1;

if (change >= 2){

change = 0; }}}

>

here is my code.

my problem is it doesnt work smoothly...

and i dont want that sound loop, but it loop.....

:(

Is there anybody give me some help?


Viewing all articles
Browse latest Browse all 2896

Trending Articles