Questions tagged [audiocontext]

AudioContext is a modular interface for audio processing for the WebAudio API.

277 questions
3
votes
2 answers

Chrome: Wrong sound when changing the audio source for Audio element and MediaStreamAudioDestinationNode

I have a app where I play different code-generated sounds. I place these sounds in a AudioBufferSourceNode. I allow the the user to choose what output device to play the sound through, so I use a MediaStreamAudioDestinationNode with its stream used…
Asher
  • 1,267
  • 1
  • 12
  • 24
3
votes
1 answer

Playing around with audioContext

Inspired by this SO answer, I have this code, and it works, but it pops and doesn't sound as smooth as it could. $('.btn').each(initDraggable); function initDraggable() { var param = {} param.drag = drag param.stop = stopper …
Phillip Senn
  • 46,771
  • 90
  • 257
  • 373
3
votes
0 answers

Changing the sample rate of audio recording in Javascript

Hi I have a working voice recorder on a browser. It implements navigator.getUserMedia and AudioContext It records the sounds in .wav format - then converts to .mp3 and uploads the file. The file sample rate is set to 44100Hz, and the mp3 output is…
pgee70
  • 3,707
  • 4
  • 35
  • 41
3
votes
0 answers

Level normalization of microphone input

I have a problem using JavaScript Web Audio API since actualization Firefox to version 31. The source of my script is unchanged. What it does? I use microphone input (generated waveforms ported through 3.5mm jack into PC), --> gain --> visualization…
mmmartin
  • 31
  • 1
2
votes
1 answer

Aligning audio for smooth playing with the web audio api

I am currently trying to figure how to play chunked audio with the web audio API, right off the bat everything does work.. however most transitions between chunks aren't as smooth as I want them to be, there's a very very brief moment of silence…
2
votes
1 answer

web audio player - iOS next song & previous song buttons are not in control center

This is something I've researched off and on for literal years and have never been able to find the answer. I found the MediaSession api which works for populating song data but the next track and previous track action handlers don't make the next/…
b.stevens.photo
  • 876
  • 2
  • 9
  • 18
2
votes
1 answer

How can I solve "HTMLMediaElement already connected previously to a different MediaElementSourceNode" problem using React functional component

I am using React Functional Components in my app created with create-react-app, so React.StrictMode is automatically enabled. I don't want to disable it as it is helping me spot potential issues as am developing. Trouble is that it makes the…
2
votes
0 answers

Normalizing audio in javascript AND saving result to file

Ive been playing around with JS normalizer to bring widely different volume recordings to play at a fairly constant volume. This code is doing it's job quite nicely. My final goal though is to allow the user to record audio with the mic, then save…
ErezM
  • 63
  • 4
2
votes
0 answers

Web Audio. How to get currenly playing audio stream?

I want to create a browser extension and I need to read audio stream from the page player. There is no audio tag in the page. But music is playing, so how can I read this music stream using JS?
2
votes
1 answer

How to get the sample rate of a microphone/input device using Javascript?

When you create a new AudioContext it sets the sample rate to the default output device. This is expected default behavior. Does anyone know if there is there any way to get the sample rate of the input device in Javascript? We can see in the docs…
avoliva
  • 3,181
  • 5
  • 23
  • 37
2
votes
1 answer

WebAudio API change volume for one of sources

I'm reading this article My goal is to play two sounds at the same time. One sound is in a different volume. Having regular "audio" tags is not a solution because it's not working well on mobile devices. So I started to dive into Web Audio API. I…
MAZ
  • 643
  • 5
  • 18
2
votes
1 answer

Add Audio Delay on outgoing WebRTC call

I'm creating an Electron app, and I want to intentially add a delay to the outgoing audio (Up to 10 seconds) in a webrtc call to simulate audio lagg. I have tried using playoutDelayHint with WebRTC but it's very inconsistent. I want to be able to…
Yogsther
  • 33
  • 4
2
votes
0 answers

AudioContext sound does not start immediately

Platform: Electron 13.1.7 Extra Library: Storyteller Engine https://github.com/hb432/storyteller I created this XPlayer class (as part of storyteller) so I could play audio with the AudioContext API. /** An audio player based on the AudioContext…
2
votes
0 answers

AudioNode clearing and disposal

Im trying to understand how garbage collection works here in audioNode. So if i go ahead and disconnect everything it will look like this. Audio Image Will that ensure it gets garbage collected? Or is there more stuff that would could prevent this.…
01234five
  • 35
  • 3
2
votes
1 answer

AudioContext is not setting the gain properly in JavaScript

I am trying to set volume over 1 on an audio element, following this article. https://cwestblog.com/2017/08/17/html5-getting-more-volume-from-the-web-audio-api/ I need to be able to set it more than once, so i've set a global array to store the…
user3284707
  • 3,033
  • 3
  • 35
  • 69