Closed SteveALee closed 2 months ago
I used the recommended approach but then faders fail. maybe .value is getting messed up?
/* seems to be problems with using gain functions
function gainSetter(audioContext, node, timeConstant = 0.04, timeOffset = 0) {
return (value) => {
const prevGain = node.gain.value
node.gain.setTargetAtTime(
value,
audioContext.currentTime + timeOffset,
timeConstant,
)
return prevGain
}
}
*/
Sometime get a click with mute.
Will be if you hit mute just as loud sample is playing.
Use gainNode's methods rather than just set value