UNPKG

standardized-audio-context

Version:

A cross-browser wrapper for the Web Audio API which aims to closely follow the standard.

17 lines 617 B
import { createIndexSizeError } from '../factories/index-size-error'; export const wrapAudioBufferGetChannelDataMethod = (audioBuffer) => { audioBuffer.getChannelData = ((getChannelData) => { return (channel) => { try { return getChannelData.call(audioBuffer, channel); } catch (err) { if (err.code === 12) { throw createIndexSizeError(); } throw err; } }; })(audioBuffer.getChannelData); }; //# sourceMappingURL=wrap-audio-buffer-get-channel-data-method.js.map