/**
 * Streaming Audio Player
 * Implements real-time audio playback using Web Audio API
 * Supports dynamic PCM chunk addition without Workers
 */
export interface StreamingAudioPlayerOptions {
    sampleRate?: number;
    channelCount?: number;
    debug?: boolean;
}
export declare class StreamingAudioPlayer {
    private audioContext;
    private sampleRate;
    private channelCount;
    private debug;
    private sessionId;
    private sessionStartTime;
    private pausedTimeOffset;
    private pausedAt;
    private scheduledTime;
    private isPlaying;
    private isPaused;
    private autoStartEnabled;
    private audioChunks;
    private scheduledChunks;
    private activeSources;
    private onEndedCallback?;
    constructor(options?: StreamingAudioPlayerOptions);
    /**
     * Initialize audio context (create and ensure it's ready)
     */
    initialize(): Promise<void>;
    /**
     * Add audio chunk (16-bit PCM)
     */
    addChunk(pcmData: Uint8Array, isLast?: boolean): void;
    /**
     * Start new session (stop current and start fresh)
     */
    startNewSession(audioChunks: Array<{
        data: Uint8Array;
        isLast: boolean;
    }>): Promise<void>;
    /**
     * Start playback
     */
    private startPlayback;
    /**
     * Schedule all pending chunks
     */
    private scheduleAllChunks;
    /**
     * Schedule next audio chunk
     */
    private scheduleNextChunk;
    /**
     * Convert PCM data to AudioBuffer
     * Input: 16-bit PCM (int16), Output: AudioBuffer (float32 [-1, 1])
     */
    private pcmToAudioBuffer;
    /**
     * Get current playback time (seconds)
     */
    getCurrentTime(): number;
    /**
     * Pause playback
     */
    pause(): void;
    /**
     * Resume playback
     */
    resume(): Promise<void>;
    /**
     * Stop playback
     */
    stop(): void;
    /**
     * Enable or disable auto-start (for delayed start scenarios)
     */
    setAutoStart(enabled: boolean): void;
    /**
     * Start playback manually (for delayed start scenarios)
     * This allows starting playback after transition animation completes
     */
    play(): void;
    /**
     * Mark playback as ended
     */
    markEnded(): void;
    /**
     * Set ended callback
     */
    onEnded(callback: () => void): void;
    /**
     * Check if playing
     */
    isPlayingNow(): boolean;
    /**
     * Get total duration of buffered audio
     */
    getBufferedDuration(): number;
    /**
     * Get remaining duration (buffered - played) in seconds
     */
    getRemainingDuration(): number;
    /**
     * Dispose and cleanup
     */
    dispose(): void;
    /**
     * Flush buffered audio
     * - hard: stops all playing sources and clears all chunks
     * - soft (default): clears UNSCHEDULED chunks only
     */
    flush(options?: {
        hard?: boolean;
    }): void;
    /**
     * Debug logging
     */
    private log;
}
//# sourceMappingURL=StreamingAudioPlayer.d.ts.map