import { type MediaPlayer } from './mediaPlayer'; type AudioChunk = { sampleRate: number; buffer: Float32Array; }; /** * An internal object used to manage an active audio stream. */ declare class AudioStream { private readonly context; readonly destNode: MediaStreamAudioDestinationNode; private readonly outputNode; private readonly analyzerNode; private nextSeqNum; private playing; constructor(context: AudioContext); get stream(): MediaStream; get streamId(): string; get analyzer(): AnalyserNode; appendBuffer(chunk: AudioChunk): void; close(): void; advance(): void; pause(): void; resume(): void; onPlaying?: (streamId: string) => void; onWaiting?: (streamId: string) => void; /** * Appends PCM audio data to the output node, converting and resampling if necessary. */ private appendPcmBuffer; /** * Resamples PCM audio data to the output node's sample rate, converting to f32 if necessary. */ private resamplePcmBuffer; /** * Appends f32 PCM audio data (with the correct sample rate) to the output node. */ private appendNativeBuffer; private handleBufferProcessed; } /** * Manages an AudioContext and allows creation of multiple audio streams * that can be played out using