问题描述
我第一次尝试在Javascript中使用Web Audio API。
对于个人项目,我试图控制音量,但是我遇到了一些困难。
我正在使用以下git项目:https://github.com/kelvinau/circular-audio-wave
changeVolume() {
const volume = this.context.createGain();
volume.gain.value = 0.1;
volume.connect(this.context.destination)
this.sourceNode.connect(volume)
}
当我将增益设置为0时,它不会使声音静音。但是当我将其设置为3时,它的声音会更大。
您知道为什么我可以增加音量但不能降低音量吗?