web-audio-api

htl5 voice recording with isualization [closed]

一笑奈何 提交于 2019-12-02 13:31:32
I'm building a HTML5 software that records a voice and when playing that voice a visualizer should be in action. Here is my code: // variables var leftchannel = []; var rightchannel = []; var recorder = null; var recording = false; var recordingLength = 0; var volume = null; var audioInput = null; var sampleRate = 44100; var audioContext = null; var context = null; var outputString; if (!navigator.getUserMedia) navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; if (navigator.getUserMedia) { navigator

Uncompressed, unencrypted, unaltered, raw transfer of real-time PCM audio data through WebRTC stream

有些话、适合烂在心里 提交于 2019-12-02 13:11:41
问题 I'm transferring a live audio stream between 2 Electron window processes using WebRTC. There are no ICE or STUN servers, or anything like that, the connection is established manually through Electron IPC communication (based on this code). Note: from the technical point of view regarding the audio streams themselves, this is very similar (if not identical) to streaming between 2 browser tabs on the same domain, so this is primarily not a question regarding Electron itself, although Electron

Web Audio API - multiple synchronized tracks - stopping previous track when new track starts

可紊 提交于 2019-12-02 05:07:46
问题 I'm trying to mimic the Web Audio API multitrack demo from the 'Mozilla Web Audio API for games' Web doc. https://developer.mozilla.org/en-US/docs/Games/Techniques/Audio_for_Web_Games#Web_Audio_API_for_games The only caveat I have is that I want the previous track to stop, once a new track is clicked (instead of playing layered on top of each other). An example would be, click drums, the drums start playing, then click guitar, the drums stop and the guitar starts right where the drums left

Uncompressed, unencrypted, unaltered, raw transfer of real-time PCM audio data through WebRTC stream

天涯浪子 提交于 2019-12-02 04:12:26
I'm transferring a live audio stream between 2 Electron window processes using WebRTC. There are no ICE or STUN servers, or anything like that, the connection is established manually through Electron IPC communication (based on this code ). Note: from the technical point of view regarding the audio streams themselves, this is very similar (if not identical) to streaming between 2 browser tabs on the same domain, so this is primarily not a question regarding Electron itself, although Electron IPC would be obviously substituted with a browser equivalent. The audio stream works, I can transmit

Web Audio API - multiple synchronized tracks - stopping previous track when new track starts

笑着哭i 提交于 2019-12-01 23:03:02
I'm trying to mimic the Web Audio API multitrack demo from the 'Mozilla Web Audio API for games' Web doc. https://developer.mozilla.org/en-US/docs/Games/Techniques/Audio_for_Web_Games#Web_Audio_API_for_games The only caveat I have is that I want the previous track to stop, once a new track is clicked (instead of playing layered on top of each other). An example would be, click drums, the drums start playing, then click guitar, the drums stop and the guitar starts right where the drums left off. Any ideas? Are there better tools/libraries for handling web audio? http://jsfiddle.net/c87z11jj/1/

html5/javascript audio play multiple tracks at the same time

做~自己de王妃 提交于 2019-12-01 20:43:57
Is it possible to play the whole audio instance at the same time? I know, I could create every time an new instance and call .play() on every instance, but I think its dirty. like sound1 = new Audio('sound1.mp3'); sound2 = new Audio('sound2.mp3); sound1.play(); sound2.play; Its more or less the same as in this thread: Play multiple sound at the same time But there has to be and elegant way? Edit: MediaController and mediagroup turned out to be vaporware. You will want to stick with the "dirty" way to do it, at least for now, as there is no official syncing solution. The proper way to play

Setting playbackRate on audio element connected to web audio api

孤者浪人 提交于 2019-12-01 18:15:10
I've been experimenting with connecting an audio element to the web audio api using createMediaElementSource and got it to work but one thing I need to do is change the playback rate of the audio tag and I couldn't get that to work. If you try to run the code below, you'll see that it works until you uncomment the line where we set the playback rate. When this line is in the audio gets muted. I know I can set the playback rate on an AudioBufferSourceNode using source.playbackRate.value but this is not what I'd like to do, I need to set the playback rate on the audio element while it's

Future of JavaScript audio?

喜你入骨 提交于 2019-12-01 18:13:19
问题 I'm teaching kids how to add audio to their JavaScript games and webpages. I knew about the HTML5 Audio API and am just now learning about the issues around the various browsers (IE surprisingly doesn't support WAV at all, etc). However, apparently there's a new Web Audio standard I was unaware of. Chrome fully supports it. Mozilla states the following about Web Audio and Firefox: Firefox currently supports the incompatible, Mozilla-specific Audio Data API, but it is marked as "deprecated" in

MediaRecorder.stop() doesn't clear the recording icon in the tab

a 夏天 提交于 2019-12-01 16:52:16
I start and stop a MediaRecorder stream. The red "recording" icon appears in the Chrome tab on start, but doesn't go away on stop. The icon looks like this: My code looks like this: const mediaRecorder = new MediaRecorder(stream); ... // Recording icon in the tab becomes visible. mediaRecorder.start(); ... // Recording icon is still visible. mediaRecorder.stop(); I also have a mediaRecorder.onstop handler defined. It doesn't return anything or interfere with the event object. What's the proper way to clear the "recording" indicator for a tab after starting and stopping a MediaRecorder instance

MediaRecorder.stop() doesn't clear the recording icon in the tab

Deadly 提交于 2019-12-01 14:39:42
问题 I start and stop a MediaRecorder stream. The red "recording" icon appears in the Chrome tab on start, but doesn't go away on stop. The icon looks like this: My code looks like this: const mediaRecorder = new MediaRecorder(stream); ... // Recording icon in the tab becomes visible. mediaRecorder.start(); ... // Recording icon is still visible. mediaRecorder.stop(); I also have a mediaRecorder.onstop handler defined. It doesn't return anything or interfere with the event object. What's the