import { TNativeAudioBufferConstructorFactory } from '../types';

export const createNativeAudioBufferConstructor: TNativeAudioBufferConstructorFactory = (window) => {
    if (window === null) {
        return null;
    }

    if (window.hasOwnProperty('AudioBuffer')) {
        return window.AudioBuffer;
    }

    return null;
};
