Skip to content

Commit

Permalink
Merge pull request #73 from Nitnelav/random-audio-annotation
Browse files Browse the repository at this point in the history
louder annotate audio
  • Loading branch information
Nitnelav authored Dec 12, 2024
2 parents 202fda0 + 5e9fa39 commit 2be4c2c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ ws.once('interaction', () => {
})

// Create Web Audio context
const audioContext = null
var audioContext = null

var gainNode = null

// Connect the audio to the equalizer
ws.media.addEventListener(
'canplay',
'loadeddata',
() => {
if (audioContext == null) {
audioContext = new AudioContext()
Expand All @@ -124,7 +124,8 @@ ws.media.addEventListener(
const mediaNode = audioContext.createMediaElementSource(ws.media)

gainNode = audioContext.createGain();
gainNode.gain.value = 100 * ws.media.volume;
console.log("Volume: " + ws.media.volume)
gainNode.gain.value = 200 * ws.media.volume;
mediaNode.connect(gainNode);
// Connect the filters to the audio output
gainNode.connect(audioContext.destination)
Expand Down

0 comments on commit 2be4c2c

Please sign in to comment.