/** * SequencerTimingHelper - Manages stable timing for karaoke highlighting * * Handles: * - High-resolution timing from spessasynth Sequencer * - Fallback to AudioContext time or performance.now() * - Time drift compensation * - Stable timing even during AudioContext interruptions */ export interface TimeSource { /** Get current playback time in seconds */ getCurrentTime(): number; /** Check if timing source is valid/ready */ isReady(): boolean; } export declare class SequencerTimingHelper { private sequencer; private audioContext; private fallbackStartTime; private fallbackElapsed; private isPlaying; private lastUpdateTime; private audioContextStartTime; constructor(); /** * Set the spessasynth Sequencer instance */ setSequencer(sequencer: any): void; /** * Set the AudioContext for fallback timing */ setAudioContext(audioContext: AudioContext): void; /** * Update playback state */ setPlaying(playing: boolean): void; /** * Get current playback time with best available source */ getCurrentTime(): number; /** * Seek to a specific time */ seek(time: number): void; /** * Reset timing to zero */ reset(): void; /** * Check if high-resolution timing is available */ hasHighResolutionTime(): boolean; /** * Get timing source info for debugging */ getTimingSourceInfo(): string; }