Is this typical? When I play a .wav as a Clip, I have access to a MASTER_GAIN control, and can use this to set the volume. When I play the same .wav as a SourceDataLine, there are no controls exposed whatsoever.
I'm using the getControls() function in both instances, on Clip "currentClip" in the first case and on SourceDataLine "currentLine" in the other. So, I'm pretty sure I'm invoking the controls correctly.
I guess, if I use a SourceDataLine, I'm going to have to scale the values for every data point in each input buffer as I am loading? Dragola.
Is that common practice?
Consulting "Killer Game Programming in Java," all the examples with volume controls pertain to Clips. So I guess most games limit themselves to Clip usage?
Why not use Clips myself? Because for my design I want (insist upon) sounds that can recur with possible overlapping. I could preload three or four instances of each and manage them as a pool, but the multiplier effect on RAM needed is worrisome. So, I thought it better to load each one when it is needed, and loading as a SourceDataLine allows for quicker starts than continually reloading new Clips on an as-needed basis. But the SourceDataLine doesn't have a volume control!?!?
But I may have to head back to some sort of Clips pooling method if decoding OGG/Vorbis turns out to be slow to kick off with SourceDataLine playback.