First, I wonder if there’s a way to set the volume of a stream?
Second, I’ve added this method in my copy of the SoundSystem:
/**
* Sets the volume of all samples attached to a given node.
*
* @param node We change the volume of this nodes children.
* @param volume The volume to set. Should be a value between 0 - 1.
*/
public static void setNodeVolume(int node, float volume) {
for (int i = 0; i < nodes[node].getQuantity(); i++) {
Sample3D sample = (Sample3D) nodes[node].getChild(i);
sample.setVolume(volume);
}
}
It feels like a good complement to the "setSampleVolume" method.
setNodeVolume didn’t quite do what I expected. Seems that it only really works on sounds currently playing on the node. That’s fine I guess, but I was wondering if we could add this to the soundManager?
public static void setMasterVolume(int vol){
FSound.FSOUND_SetSFXMasterVolume(vol);
}