javax.sound.sampled cannot change volume of clip (part 2, closed before properly testing)

oops. go here for what I have so far: https://discordapp.com/channels/648956210850299986/1204195625168805898
The summary is that I can control one or two things in my audio clip, but they don't seem to change anything. Also, volume, the one I want, is still unsupported. Here's what the code looks like currently:
public void play(float volume) {
    try {
        AudioInputStream stream = AudioSystem.getAudioInputStream(new ByteArrayInputStream(file));
        DataLine.Info info = new DataLine.Info(Clip.class, stream.getFormat());
        Clip clip = (Clip) AudioSystem.getLine(info);
        clip.open(stream);
        clip.start();
        ((FloatControl) clip.getControl(FloatControl.Type.VOLUME)).setValue(volume);
    } catch (UnsupportedAudioFileException | IOException | LineUnavailableException e) {
        e.printStackTrace();
    }
}

Stuff like master gain works, but again, doesn't change anything. Putting before starting makes them all unsupported. Help?
Was this page helpful?