files/en-us/web/api/baseaudiocontext/index.md
{{APIRef("Web Audio API")}}
The BaseAudioContext interface of the Web Audio API acts as a base definition for online and offline audio-processing graphs, as represented by {{domxref("AudioContext")}} and {{domxref("OfflineAudioContext")}} respectively. You wouldn't use BaseAudioContext directly — you'd use its features via one of these two inheriting interfaces.
A BaseAudioContext can be a target of events, therefore it implements the {{domxref("EventTarget")}} interface.
{{InheritanceDiagram}}
0.AudioContext.Also implements methods from the interface {{domxref("EventTarget")}}.
ArrayBuffer is usually loaded from an {{domxref("XMLHttpRequest")}}'s response attribute after setting the responseType to arraybuffer. This method only works on complete files, not fragments of audio files.AudioContext's state changes due to the calling of one of the state change methods ({{domxref("AudioContext.suspend")}}, {{domxref("AudioContext.resume")}}, or {{domxref("AudioContext.close")}}).const audioContext = new AudioContext();
const oscillatorNode = audioContext.createOscillator();
const gainNode = audioContext.createGain();
const finish = audioContext.destination;
{{Specifications}}
{{Compat}}