Skip to content

getGainValue() returns wrong value. #30

Open
sunny-chung/java-stream-player
#2
@HelgeStenstrom

Description

@HelgeStenstrom

public float getGainValue() {
return !hasControl(FloatControl.Type.MASTER_GAIN, gainControl) ? 0.0F : gainControl.getValue();
}

At least it doesn't return the value set by setGain(), which is confusing.
After reading the code, I realize that the internal gainControl probably has a setting on a dB scale, whereas setGain is linear.

getGainValue() doesn't translate from the gainControl setting, but setGain() does, which leads to the confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions