goxr3plus / goxr3plus/java-stream-player

getGainValue() returns wrong value.

Open
#30 2 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Java
Stars
158
Forks
36
PR merge metrics
No merged PRs in 30d

Description

https://github.com/goxr3plus/java-stream-player/blob/ea4b7d9fda27f81902a0774a2535842ead6c622a/src/main/java/com/goxr3plus/streamplayer/stream/StreamPlayer.java#L1096-L1099

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.