Skip to content

Instantly share code, notes, and snippets.

@s3thi
Last active January 11, 2016 12:05
Show Gist options
  • Select an option

  • Save s3thi/ce76e86f5df685328149 to your computer and use it in GitHub Desktop.

Select an option

Save s3thi/ce76e86f5df685328149 to your computer and use it in GitHub Desktop.
sampler.js – initialize audio context
import { Component, OnInit } from ‘angular2/core’;
@Component({
selector: 'my-app',
template: `<h1>My First Angular2 App</h1>`
})
export class AppComponent implements OnInit {
private audioContext: AudioContext;
ngOnInit() {
this.audioContext = new AudioContext();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment