Questions tagged [audiocontext]

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

277 questions
0
votes
1 answer

Why does Chrome not output WebRTC audio with AudioContext?

I'm implementing a WebRTC Audio chat. I have everything working, and was initially using
enyo
  • 16,269
  • 9
  • 56
  • 73
0
votes
1 answer

AudioContext.resume()/.suspend() is faulting

In order to create triggers and have them play, I need to have copied them and hit the button I created. The copy is good. But when I toggle the button, it says that I am Illegally invoking the functions of the AudioContext Object. I attemped using…
Anthony Pulse
  • 71
  • 1
  • 7
0
votes
1 answer

How to use AudioContext to play multiple audio clips

What I am trying to do is play multiple audio clips in sequence using AudioContext so that the audio is smooth but I am doing something wrong. Most of the documents I've seen only show how to use a Synthesizer or play 1 audio. How would I go about…
svarlitskiy
  • 618
  • 5
  • 11
0
votes
1 answer

Receive audio download in chunks and play smoothly with web audio API

I could not really find any way to smoothly get and play audio chunks with Web Audio API. Currently I am simply fetching an audio file from my CDN, but I have tested it on slower internet connections, and as expected it results in a long wait before…
0
votes
0 answers

how to change value during a slow linearRampToValueAtTime

If 'volume' is the value of a range slider, how can a user update the volume during a long fade? The only way I can think of is by using a setTimeout loop and doing the fade in small increments, constantly checking the range slider value at each…
brian dm
  • 21
  • 4
0
votes
1 answer

AudioContext Mute sound when setValueAtTime foreach still working

I have class MorseCodeAudio to create sound for Morse'a code. I'm using window.AudioContext. In my class I have an method with forEach: morseCode() { // irrelevant code this.text.split('').forEach(letter => { switch(letter) { …
michal
  • 1,534
  • 5
  • 28
  • 62
0
votes
1 answer

WebAudioAPI AnalyserNode is not working on mobile with MediaElementAudioSourceNode

I am trying to make an audio visualizer in html/javascript using the Web Audio API and I want it to work on mobile phones too. I have my audio as a local file. Now I found two ways to import it, either using new Audio(src) or asynchronously using an…
Drakalex
  • 1,488
  • 3
  • 19
  • 39
0
votes
1 answer

Web Audio API: createMediaStreamDestination().stream - no sound

I'm stuck with a problem in which whenever I pass the stream from createMediaStreamDestination to an audio element srcObject, no audio is being played. My implementation is based off of the response posted here Combine setSinkId with…
vwg
  • 1
  • 1
0
votes
0 answers

Get AudioContext from an object instead of an audio or video tag?

I'm trying to get the audio context from an embedded YouTube video, but can't use an iframe because of cross origin requests being blocked. I found on the thread, (Embed HTML5 YouTube video without iframe?), that YouTube videos can be embedded using…
0
votes
1 answer

Is it possible to avoid the "AudioContext was not allowed to start" alert?

I faced a browser policy problem "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page." I wanted to execute that below code when page loaded. So, I tried to mock the user click gesture using a…
0
votes
1 answer

How can I programmatically determine when an JavaScript AudioContext AudioBufferSource is done playing?

I am playing .MP3 files with the Web Audio API, and I am having trouble programmatically determining when the song is finished playing. This is what I have: var request = new XMLHttpRequest(); audioContext = new AudioContext(); source =…
Brian
  • 1,726
  • 2
  • 24
  • 62
0
votes
0 answers

How can I keep sound playing on my guitar tuner site the way Fender does on their site?

EDIT: Quickly gonna mention that in mobile, the phone cannot be on vibrate/silent mode or else the sounds won't play for whatever reason. I created a tune-by-ear guitar tuner using React and Howler.js and so far everything works great on Desktop. It…
0
votes
1 answer

Modify AudioBuffer volume in JavaScript

How can modify AudioBuffer volume in javascript ? I just wanna modify AudioBuffer volume without play any sound and without use any gain. Finally , I wanna to have a new AudioBuffer with modified volume.
0
votes
1 answer

Cannot get HTML audio element to play on Chrome Android (no progress unless muted)

I'm posting this in case others have a similar problem. I have a web app that uses the
codedread
  • 1,312
  • 11
  • 18
0
votes
1 answer

How can I play an audio file at specified times in JavaScript AudioContext?

How can I play an audio file at specified times in JavaScript AudioContext ? const context = new AudioContext(); const source = context.createBufferSource(); const audioBuffer = await fetch('./Sound.wav') .then(res =>…