import type { AudioPlaybackStrategy } from '../interfaces'; /** * Playback strategy for browser environments using the Web Audio API. * * If no sampleRate is provided in the constructor, the AudioContext is created * lazily on the first play() call using the browser's native rate. * After loading a sampler, set `player.sampleRate = sampler.sampleRate` * to ensure the buffer sample rate matches the source WAV file. */ export declare class WebPlayer implements AudioPlaybackStrategy { volume: number; private _audioContext; private _sampleRate; constructor(sampleRate?: number); get sampleRate(): number | undefined; /** * Updates the sample rate. If the AudioContext already exists with a different * rate, it will be closed and recreated with the new rate. */ set sampleRate(rate: number); private _initAudioContext; private get audioContext(); /** * Plays the provided audio buffer through the browser's AudioContext. * @param bufferData The audio data to play. */ play(bufferData: Float32Array): Promise; /** * Merges multiple audio buffers into one and plays the result. * @param buffers Array of Float32Array audio chunks. */ drainAndPlay(buffers: Float32Array[]): Promise; }