Skip to main content

Forums

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #299807
    billygard
    Participant

    I have been working recently with webaudio api, starting with the oscillator, and now to play backbround music for my HTML/Javascript based video game, since it allows looping the music without a gap in sound when it ends and repeats.

    I found a curious bug in WebAudio API’s gainNode while using the familiar source->gainNode->destination contruct. In the context of my game code, the value range for gainNode.gain.value seems to be -1 to +1, rather than 0 to 1. The only gain value that is silent is -1. A gain value of 0 plays it at half-volume.

    I thought zero was supposed to always be the silent value, regardless of whether using linear or exponential.

    When running the game code, I can examine the value of gainNode.gain.value in a debug window, and it shows the value I assigned it to. So the numbers weren’t modified before assigning it to the gainNode.

    I tried using the same code in a small test file in which it worked totally normally, where a value of 0 made it silent. Could it be a totally undiscovered but in Safari 13.0.3 that is triggered simply by using too large a javascript file?

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.