mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 02:57:30 +00:00
Fixes issue #717
GainNode now attenuates or boosts the signal correctly, according to the logarithmic dB scale
This commit is contained in:
parent
99b4ad5f98
commit
ff1d18c044
1 changed files with 1 additions and 1 deletions
|
|
@ -187,7 +187,7 @@ export default class Media {
|
|||
setVolume(volume: number) {
|
||||
this._gainNode.gain.value = volume / 100;
|
||||
}
|
||||
|
||||
// from 0 to 100
|
||||
// The input value here is 0-100 which is kinda wrong, since it represents -12db to 12db.
|
||||
// For now, 50 is 0db (no change).
|
||||
// Equation used is: 10^((dB)/20) = x, where x (preamp.gain.value) is passed on to gainnode for boosting or attenuation.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue