Questions tagged [audiocontext]

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

277 questions
0
votes
0 answers

How to send sound input from HTML to server

I need to send sound input to server. Can I send it as variable? What should I do in the function start_microphone(), and what methods of AudioContext() should I use? var input = null; var webaudio_tooling_obj = function() { var audioContext =…
Thanawat.ch
  • 25
  • 1
  • 2
  • 7
0
votes
1 answer

Convert code to JS Object Literal Pattern

I want to start writing better code and I have come to understand that putting everything relevant to a particular piece of functionality inside an object is a good idea. Edit: I've tried to take on board the concept in @SoftwareEngineer171's…
Robin Andrews
  • 3,514
  • 11
  • 43
  • 111
0
votes
0 answers

Audio element fails to play when routed through an AudioContext from a streaming source

var audio = document.getElementById("audio"); audio.src = "http://SAMEDOMAIN:8000/stream.ogg"; // works with if(0) //audio.src = "test.ogg"; // Works always //audio.src = "http://SAMEDOMAIN/test.ogg"; // works always console.log(audio.src); if(1){…
Moycakes
  • 76
  • 3
0
votes
1 answer

Multiple AudioContext error when playing sounds on element's hover state

I'm trying to play sounds and visualize the frequency (via D3.js) when I'm hovering an item. The problem is that I get this error when I jump from one item to another: main.js:94 Uncaught NotSupportedError: Failed to construct 'AudioContext': The…
user990463
  • 439
  • 1
  • 7
  • 27
0
votes
1 answer

Shared Chrome AudioContext in Persistent Background Script

var audioContext = new window.AudioContext chrome.runtime.onMessage.addListener( function(imageUrl, sender, sendResponse) { if (imageUrl != "") sound(523.251, 587.330) else sound(523.251, 493.883) }) function sound(frequency1,…
DSHCS
  • 11
  • 1
  • 3
0
votes
1 answer

How to listen when audioContext.destination do not play sound in Web Audio API

I'm using the $timeout angular function to call tick() each 512 ms in order to play datas which are in my audio queue. I'm using this to perform a live audio stream. Sometimes there are some cuts in the sounds and I really need to maintain a delta…
guicontat
  • 105
  • 1
  • 11
0
votes
1 answer

Web Audio API Stream: why isn't dataArray changing?

EDIT 2: solved. See answer below. EDIT 1: I changed my code a little, added a gain node, moved a function. I also found that IF I use the microphone, it will work. Still doesn't work with usb audio input. Any idea? This is my current…
0
votes
2 answers

How to Release AudioContext in Jasmine Tests

I've got an Angular service that sets up an audioContext. Jasmine is creating a new service for each test, so after 6 tests all tests fail with the error: Error: Failed to construct 'AudioContext': The number of hardware contexts provided (6) is…
0
votes
1 answer

Livescript: AudioContext can't get defined

I'm trying to load audio with XMLHttpRequests and AudioContext, my code looks like this: class AudioExample audioContext: null init: -> AudioContext = window.AudioContext || window.webkitAudioContext @audioContext = new…
user3946265
0
votes
1 answer

Overlapping parts while buffering mp3

I am trying to stream MP3 file from a nodeJS server using BinaryJS - http://binaryjs.com/ But, when I am decoding the buffers on the client side they are seems to be overlapping, Meaning that the new chunk of data is being played few milliseconds…
Ronco
  • 109
  • 1
  • 10
0
votes
2 answers

web audio api convolver doens't seem to output zeros

I have used web audio api to connect a microphone to a convolver to an analyser to a flot gui to plot the spectrum. For testing I set the buffer of the convolver to be unity but I don't get any output. If I bypass the convolver and connect the mic…
Hanan Shteingart
  • 8,480
  • 10
  • 53
  • 66
0
votes
2 answers

Firefox 37 throwing error when trying to add microphone volume control for WebRTC audio context

Since firefox 37 I cannot add volume control to the input(microphone), i get the error : IndexSizeError: Index or size is negative or greater than the allowed amount It works fine on Chrome. Here is the code sample : var audioContext = new…
Jeffrey Nicholson Carré
  • 2,950
  • 1
  • 26
  • 44
0
votes
0 answers

Use AudioContext to display song's overall waveform

I am trying to display the waveform of a song pretty much like SoundCloud does it per individual track but I am having some difficulties. So far this is what I am assuming to be the right start. $scope.audioCtx = new (window.AudioContext ||…
Jules
  • 191
  • 2
  • 12
0
votes
1 answer

Javascript Reg Pack Crusher doesn't crush Audiocontext

I want to crush this Javascript code: var ac = new AudioContext; //works fine without this line var oscillator = ac.createOscillator(); var analyser = ac.createAnalyser(); var gain = ac.createGain();` with this…
user4653097
0
votes
1 answer

Half speed AudioContext from microphone when written to server

I am trying to write a microphone recording on client javascript, transfer it to server then convert it to silk. I have the audio playing back on server using the Speaker module using these settings var speaker = new Speaker({ channels: 1, …
Neablis
  • 894
  • 2
  • 12
  • 30
1 2 3
18
19