import { Dispatch, RefObject, SetStateAction } from 'react';
import type BaseAudioContext from '../core/BaseAudioContext';
import { AudioFileSourceNode } from './AudioFileSourceNode';
import type { AudioSource, PreloadType } from './types';
type UseAudioSourceLoaderParams = {
    context: BaseAudioContext | undefined;
    path: string;
    source: AudioSource;
    preloadMode: PreloadType;
    forceDownload: boolean;
    loop: boolean;
    playbackRate: number;
    preservesPitch: boolean;
    autoPlay: boolean;
    effectiveVolumeRef: RefObject<number>;
    onLoadStart: () => void;
    onLoad: () => void;
    onError: (error: Error) => void;
    onEnded: (duration: number) => void;
    onAutoPlay: () => void;
};
type UseAudioSourceLoaderResult = {
    fileSourceRef: RefObject<AudioFileSourceNode | null>;
    ready: boolean;
    duration: number;
    setDuration: Dispatch<SetStateAction<number>>;
    loadForPlayback: () => Promise<boolean>;
    disposeSource: () => void;
};
export declare function useAudioSourceLoader({ context, path, source, preloadMode, forceDownload, loop, playbackRate, preservesPitch, autoPlay, effectiveVolumeRef, onLoadStart, onLoad, onError, onEnded, onAutoPlay, }: UseAudioSourceLoaderParams): UseAudioSourceLoaderResult;
export {};
//# sourceMappingURL=useAudioSourceLoader.d.ts.map