xxxxxxxxxx
20
let sound;
function preload(){
sound = loadSound("1.mp3")
}
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
}
function mousePressed(){
if(sound.isPlaying()){
sound.pause();
} else {
sound.play();
}
}