/** * Load example audio file from remote source * @param {string} key - Example identifier from AUDIO_REGISTRY * @param {boolean} hq - Load high quality version (default: false) * @param {string} baseUrl - Base URL for audio files * @returns {Promise} Audio data as ArrayBuffer */ export function example(key: string, hq?: boolean, baseUrl?: string): Promise; /** * Load and decode audio example to AudioBuffer * @param {string} key - Example identifier * @param {boolean} hq - Load high quality version * @param {AudioContext} audioContext - Web Audio API context * @param {string} baseUrl - Base URL for audio files * @returns {Promise} Decoded AudioBuffer */ export function exampleBuffer(key: string, hq?: boolean, audioContext?: AudioContext, baseUrl?: string): Promise; /** * Get audio data as Float32Array from AudioBuffer * @param {string} key - Example identifier * @param {boolean} hq - Load high quality version * @param {number} channel - Channel to extract (default: 0) * @param {AudioContext} audioContext - Web Audio API context * @returns {Promise} Audio samples */ export function exampleAudio(key: string, hq?: boolean, channel?: number, audioContext?: AudioContext): Promise; /** * List all available audio examples * @returns {Array} List of available examples with metadata */ export function listExamples(): Array; /** * Get metadata for a specific example * @param {string} key - Example identifier * @returns {Object} Example metadata */ export function exampleInfo(key: string): any; /** * Load local audio file from user input * @param {File} file - File object from input element * @param {AudioContext} audioContext - Web Audio API context * @returns {Promise} Decoded AudioBuffer */ export function loadFile(file: File, audioContext?: AudioContext): Promise; /** * Save audio data as downloadable file * * Tier-2 proof-of-work repair (2026-07-02): the private _encodeWAV here was * one of the three divergent encoders that src/io/wav.js explicitly replaced; * saveAudio now delegates to io/wav.encodeWav and returns the Blob so callers * can verify the roundtrip (proof: examples/web/file-io.html). * * @param {Float32Array} audioData - Audio samples (mono) * @param {number} sampleRate - Sample rate * @param {string} filename - Output filename * @param {string} format - Audio format ('wav', 'ogg') * @returns {Blob} The encoded WAV Blob (also offered as a download) */ export function saveAudio(audioData: Float32Array, sampleRate: number, filename?: string, format?: string): Blob; /** * Get cache management interface * @returns {Object} Cache management functions */ export function cache(): any; /** * Create audio visualization data * * Tier-2 proof-of-work repair (2026-07-02): sampleRate was hard-coded to * 22050 in the return value regardless of the actual audio; it is now an * explicit parameter. * * @param {Float32Array} audioData - Audio samples * @param {number} points - Number of visualization points * @param {number} sampleRate - Sample rate of audioData (default: 22050) * @returns {Object} Visualization data */ export function createVisualization(audioData: Float32Array, points?: number, sampleRate?: number): any; /** * Utility function to check if Web Audio API is available * * Coverage close-out repair (2026-07-02): guarded the bare `window` read — * an environment-detection predicate must ANSWER the question in Node and * workers (false), not crash with a ReferenceError. * @returns {boolean} True if Web Audio API is supported */ export function isWebAudioSupported(): boolean; /** * Create a new Web Audio API context with proper configuration * @param {Object} options - AudioContext options * @returns {AudioContext} Configured AudioContext */ export function createAudioContext(options?: any): AudioContext;