I have red the issue: #65 but did not find the function to suppress warnings. Usecase described below:
Hi, I still have these warning when setting the amplitude to 0 with version 2.4.0 - but this is intentional as I need to dynamically change volumes and at times assign 0 to certain channels.
In Engine.java line 606:
// static helper methods that do stuff like checking argument values or
// printing library messages
protected static boolean checkAmp(float amp) {
if (amp < -1 || amp > 1) {
Engine.printError("amplitude has to be in [-1,1]");
return false;
} else if (amp == 0.0) {
Engine.printWarning("an amplitude of 0 means this sound is not audible now");
}
return true;
}
line 651
protected static void printError(String message) {
Engine.println("Sound library error: " + message);
}
What is the method to suppress warnings? I can probably just hack it by assigning Float.MIN_VALUE but I would rather have a truly 0.0 volume there...
Reactions are currently unavailable
I have red the issue: #65 but did not find the function to suppress warnings. Usecase described below:
Hi, I still have these warning when setting the amplitude to 0 with version 2.4.0 - but this is intentional as I need to dynamically change volumes and at times assign 0 to certain channels.
In Engine.java line 606:
// static helper methods that do stuff like checking argument values or // printing library messages protected static boolean checkAmp(float amp) { if (amp < -1 || amp > 1) { Engine.printError("amplitude has to be in [-1,1]"); return false; } else if (amp == 0.0) { Engine.printWarning("an amplitude of 0 means this sound is not audible now"); } return true; }line 651
protected static void printError(String message) { Engine.println("Sound library error: " + message); }What is the method to suppress warnings? I can probably just hack it by assigning Float.MIN_VALUE but I would rather have a truly 0.0 volume there...