import '../../globals.js';
import tambo from './tambo.js';
// create a Web Audio context
let phetAudioContext;
if (window.AudioContext) {
    phetAudioContext = new window.AudioContext();
}
else if (window.webkitAudioContext) {
    phetAudioContext = new (window.webkitAudioContext)(); // eslint-disable-line new-cap
}
else {
    // The browser doesn't support creating an audio context, create an empty object.  Failures will occur the first time
    // any code tries to do anything with the audio context.
    phetAudioContext = {};
    console.error('error: this browser does not support Web Audio');
}
// register for phet-io
tambo.register('phetAudioContext', phetAudioContext);
export default phetAudioContext;
//# sourceMappingURL=phetAudioContext.js.map