mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
set current gain node value to audio volume state every play
This commit is contained in:
parent
e4d95e2d9e
commit
8923d2e637
@ -464,6 +464,8 @@ export default class Player extends Core {
|
||||
|
||||
if (params.volume >= 0) {
|
||||
this.currentAudioInstance.gainNode.gain.value = params.volume
|
||||
} else {
|
||||
this.currentAudioInstance.gainNode.gain.value = this.state.audioVolume
|
||||
}
|
||||
|
||||
if (this.realtimeAnalyzerNode) {
|
||||
@ -559,7 +561,7 @@ export default class Player extends Core {
|
||||
|
||||
console.log("linearFadeoutTime", this.audioContext.currentTime, linearFadeoutTime)
|
||||
|
||||
console.log("crossfading offset", ( this.currentAudioInstance.audioElement.duration - this.currentAudioInstance.audioElement.currentTime) - Number(params.crossfading.toFixed(2)))
|
||||
console.log("crossfading offset", (this.currentAudioInstance.audioElement.duration - this.currentAudioInstance.audioElement.currentTime) - Number(params.crossfading.toFixed(2)))
|
||||
|
||||
params.instance.gainNode.gain.linearRampToValueAtTime(0.00001, linearFadeoutTime)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user