It’s been a long time I didn’t use sound with processing. I wanted to play a file and setting his volume, and I discovered the Sound libraries aren’t working with windows anymore. So I decided to go back to Minim, but I can’t manage to set the volume or the gain.
What can I do ?
Here is the message I get :
=== Minim Error ===
=== Volume is not supported.
and here is a sample of my code :
import ddf.minim.*;
Minim minim;
AudioPlayer player;
void setup() {
minim = new Minim(this);
player = minim.loadFile("walk.wav");
player.play();
player.setVolume(0);
}
Setting the volume with gain, instead of with the setVolume() function which I hear has some issues with some versions of Processing. Read about that here.
Gain should be able to work though. Hopefully this helps,
Hi @EnhancedLoop7, thanks for your answer.
On my mac os 10.13.4 the setGain fonction is not working either since I can still hear the sound, but the error message has changed
==== JavaSound Minim Error ====
==== Error reading from the file - Stream closed
Here is the code
import ddf.minim.*;
Minim minim;
AudioPlayer player;
void setup() {
minim = new Minim(this);
player = minim.loadFile("walk.wav");
player.setGain(0);
player.play();
}
Is there a setGain() function? Forgive me if I’m mistaken but I haven’t really heard of it. Maybe you can try shifting the gain like shown in the link I sent? Hopefully that works,