import { OwnedAudioFrameBuffer, AudioFrameBufferInfo } from '@livekit/rtc-ffi-bindings';

declare class AudioFrame {
    data: Int16Array;
    sampleRate: number;
    channels: number;
    samplesPerChannel: number;
    private _userdata;
    constructor(data: Int16Array, sampleRate: number, channels: number, samplesPerChannel: number, userdata?: Record<string, unknown>);
    static create(sampleRate: number, channels: number, samplesPerChannel: number, userdata?: Record<string, unknown>): AudioFrame;
    /** @internal */
    static fromOwnedInfo(owned: OwnedAudioFrameBuffer): AudioFrame;
    /** @internal */
    protoInfo(): AudioFrameBufferInfo;
    /** Returns the user data associated with the audio frame. */
    get userdata(): Record<string, unknown>;
}
/**
 * Combines one or more `rtc.AudioFrame` objects into a single `rtc.AudioFrame`.
 *
 * This function concatenates the audio data from multiple frames, ensuring that all frames have
 * the same sample rate and number of channels. It efficiently merges the data by preallocating the
 * necessary memory and copying the frame data without unnecessary reallocations.
 *
 * @param buffer - a single AudioFrame or list thereof
 */
declare const combineAudioFrames: (buffer: AudioFrame | AudioFrame[]) => AudioFrame;

export { AudioFrame, combineAudioFrames };
