Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WebAudio
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Tiffany Conroy
October 01, 2012
Programming
190
1
Share
WebAudio
GET EXCITED AND PLAY!!
Tiffany Conroy
October 01, 2012
More Decks by Tiffany Conroy
See All by Tiffany Conroy
Beautiful Authentication: Tear down the barbed wire
theophani
3
860
Lions and tigers and handling user capabilities
theophani
1
730
What about the CSSOM?
theophani
3
560
Cutting the fat
theophani
4
630
When to use Ajax and when to reload
theophani
6
1.8k
Version Control All The Codes
theophani
12
1.3k
Design Processes, Not Interfaces
theophani
5
1.8k
Other Decks in Programming
See All in Programming
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
230
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
存在論的プログラミング: 時間と存在を記述する
koriym
5
820
Coding as Prompting Since 2025
ragingwind
0
760
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.7k
20260320登壇資料
pharct
0
160
Java 21/25 Virtual Threads 소개
debop
0
330
安いハードウェアでVulkan
fadis
1
920
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
110
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
120
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
110
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
330
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.5k
Facilitating Awesome Meetings
lara
57
6.8k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
310
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Paper Plane (Part 1)
katiecoart
PRO
0
6.5k
The Cult of Friendly URLs
andyhume
79
6.8k
We Are The Robots
honzajavorek
0
210
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
320
Transcript
WEBAUDIO
WebAudio != <audio … >
// create new <audio> var audioElement = new Audio();
// create new WebAudio Context var context = new audioContext();
// create new WebAudio Context var context = new webkitAudioContext();
WICKED WEBAUDIO DEMOS http://chromium.googlecode.com/svn/trunk/samples/audio/samples.html
PLAY
audioElement.src = path // check/wait until you can play audioElement.play();
var source = context.createBufferSource(); source.buffer = buffer; source.connect(context.destination); source.noteOn(at); //
PLAY
var source = context.createBufferSource(); source.buffer = buffer; source.connect(context.destination); source.noteOn(at); //
PLAY
var source = context.createBufferSource(); source.buffer = buffer; source.connect(context.destination); source.noteOn(at); //
PLAY
$.ajax({ url: "/path/to/my/sound/file", success: decodeAudioData, requestType: "arraybuffer" });
$.ajax({ url: "/path/to/my/sound/file", success: decodeAudioData, requestType: "arraybuffer" }); NOPE
var request = new XMLHttpRequest(); request.open("GET", "/path/to/sound"); request.responseType = "arraybuffer";
request.onload = decodeAudioData; request.send();
var request = new XMLHttpRequest(); request.open("GET", "/path/to/sound"); request.responseType = "arraybuffer";
request.onload = decodeAudioData; request.send();
var decodeAudioData = function() { context.decodeAudioData( request.response, decodeSuccess); };
var decodeSuccess = function(buffer) { doSomething(buffer); };
var decodeSuccess = function(buffer) { doSomething(buffer); };
var decodeSuccess = function(buffer) { doSomething(buffer); };
I MADE SOME FUNCTIONS github.com/theophani/load-sounds
var loadSound = function(path, callback) { // load the sound
sorta like I showed before };
var loadSounds = function(paths, callback) { // load a bunch
of sounds };
var playSound = function(buffer) { // stuff with source and
context };
Tiffany Conroy github.com/theophani/load-sounds @theophani