/*! * Copyright (c) 2025-present, Vanilagy and contributors * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { Frame } from 'node-av'; export declare const getOpenAudioDataCount: () => number; /** * Audio data in decoded form. * * Corresponds to the WebCodecs AudioData API. */ export declare class AudioDataPolyfill { /** @internal */ _data: Uint8Array | Frame | null; private closed; /** * The sample format, or null if closed. */ readonly format: AudioSampleFormat | null; /** * The number of samples per second. */ readonly sampleRate: number; /** * The number of audio frames (samples per channel). */ readonly numberOfFrames: number; /** * The number of audio channels. */ readonly numberOfChannels: number; /** * The timestamp in integer microseconds. */ readonly timestamp: number; /** * The duration in integer microseconds. */ readonly duration: number; constructor(init: Frame); constructor(init: AudioDataInit); private ensureNotClosed; /** * Returns the number of bytes needed to hold a copy of the audio data. */ allocationSize(options: AudioDataCopyToOptions): number; /** * Copies the audio data to a destination buffer. */ copyTo(destination: AllowSharedBufferSource, options: AudioDataCopyToOptions): void; /** * Creates a copy of this audio data. */ clone(): AudioData; /** * Closes the audio data and releases all resources. */ close(): void; }