/**
 * AudioEncoder - Encodes AudioData to encoded audio data
 * Implements the W3C WebCodecs AudioEncoder interface
 */
import { AudioData } from './AudioData';
import { EncodedAudioChunk } from './EncodedAudioChunk';
import { CodecState, DOMException } from './types';
export type AudioBitrateMode = 'constant' | 'variable';
export interface AudioEncoderConfig {
    codec: string;
    sampleRate: number;
    numberOfChannels: number;
    bitrate?: number;
    bitrateMode?: AudioBitrateMode;
}
export interface AudioEncoderInit {
    output: (chunk: EncodedAudioChunk, metadata?: AudioEncoderOutputMetadata) => void;
    error: (error: DOMException) => void;
}
export interface AudioEncoderOutputMetadata {
    decoderConfig?: {
        codec: string;
        sampleRate: number;
        numberOfChannels: number;
        description?: ArrayBuffer;
    };
}
export interface AudioEncoderSupport {
    supported: boolean;
    config: AudioEncoderConfig;
}
export declare class AudioEncoder {
    private _native;
    private _state;
    private _outputCallback;
    private _errorCallback;
    private _encodeQueueSize;
    private _config;
    private _sentDecoderConfig;
    private _listeners;
    static isConfigSupported(config: AudioEncoderConfig): Promise<AudioEncoderSupport>;
    constructor(init: AudioEncoderInit);
    get state(): CodecState;
    get encodeQueueSize(): number;
    /**
     * Minimal EventTarget-style API for 'dequeue' events, mirroring VideoEncoder.
     */
    addEventListener(type: string, listener: () => void, options?: {
        once?: boolean;
    }): void;
    removeEventListener(type: string, listener: () => void): void;
    private _dispatchEvent;
    configure(config: AudioEncoderConfig): void;
    encode(data: AudioData): void;
    flush(): Promise<void>;
    reset(): void;
    close(): void;
    private _onChunk;
    private _onError;
}
//# sourceMappingURL=AudioEncoder.d.ts.map