web-audio

Define 'valid mp3 chunk' for decodeAudioData (WebAudio API)

邮差的信 提交于 2019-11-27 18:52:21
I'm trying to use decodeAudioData to decode and play back an initial portion of a larger mp3 file, in javascript. My first, crude, approach was slicing a number of bytes off the beginning of the mp3 and feeding them to decodeAudioData. Not surprisingly this fails. After some digging it seems that decodeAudioData is only able to work with 'valid mp3 chunks' as documented by Fair Dinkum Thinkum , here . However there is no clarification about the structure of a valid mp3 chunk (the author of the aforementioned doesn't go into this). I am aware of the various mp3 splitters that exist out there

Access microphone from a browser - Javascript

浪子不回头ぞ 提交于 2019-11-27 18:31:37
Is it possible to access the microphone (built-in or auxiliary) from a browser using client-side JavaScript? Ideally, it would store the recorded audio in the browser. Thanks! Here we capture microphone audio as a Web Audio API event loop buffer using getUserMedia() - time domain and frequency domain snippets of each audio event loop buffer is printed (viewable in browser console just hit key F12 or ctrl+shift+i ) <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>capture microphone audio into buffer</title> <script type="text/javascript"> var webaudio

No sound on iOS 6 Web Audio API

大城市里の小女人 提交于 2019-11-27 11:02:20
I was really excited to see iOS 6 supports the Web Audio API, since we make HTML5 games. However, I cannot get iOS 6 to play any sound at all using the Web Audio API with examples that work fine in desktop Chrome. Here is a HTML5 game with touch controls and playing audio via the Web Audio API (if present - if not it will fall back to HTML5 audio): http://www.scirra.com/labs/sbios6b/ Edit: @Srikumar suggested some workarounds. I applied them at the version below. It still does not work! http://www.scirra.com/labs/sbios6f/ Everything plays just fine on desktop Chrome, but iOS 6 emits no sound

Is there a way to use the Web Audio API to sample audio faster than real-time?

北城以北 提交于 2019-11-27 03:51:49
I'm playing around with the Web Audio API & trying to find a way to import an mp3 (so therefore this is only in Chrome), and generate a waveform of it on a canvas. I can do this in real-time, but my goal is to do this faster than real-time. All the examples I've been able to find involve reading the frequency data from an analyser object, in a function attached to the onaudioprocess event: processor = context.createJavascriptNode(2048,1,1); processor.onaudioprocess = processAudio; ... function processAudio{ var freqByteData = new Uint8Array(analyser.frequencyBinCount); analyser

Why aren't Safari or Firefox able to process audio data from MediaElementSource?

杀马特。学长 韩版系。学妹 提交于 2019-11-27 01:53:16
Neither Safari or Firefox are able to process audio data from a MediaElementSource using the Web Audio API. var audioContext, audioProcess, audioSource, result = document.createElement('h3'), output = document.createElement('span'), mp3 = '//www.jonathancoulton.com/wp-content/uploads/encodes/Smoking_Monkey/mp3/09_First_of_May_mp3_3a69021.mp3', ogg = '//upload.wikimedia.org/wikipedia/en/4/45/ACDC_-_Back_In_Black-sample.ogg', gotData = false, data, audio = new Audio(); function connect() { audioContext = window.AudioContext ? new AudioContext() : new webkitAudioContext(), audioSource =