/**
 * Configuration options for creating an Audio instance.
 */
type AudioProp = {
    file: string;
    volume?: number;
    autoPlay?: boolean;
    loop?: boolean;
    preload?: boolean;
};
/**
 * Valid event types that can be emitted by the Audio instance.
 */
type AudioEvent = 'ready' | 'start' | 'state' | 'end';
/**
 * Audio player class that provides control over a single audio file.
 * Implements the AudioType interface for managing audio playback, volume, and events.
 */
export declare class AudioClass {
    /** @private Path or URL to the audio file */
    private _file;
    /** @private Initial volume level set during construction */
    private _initialVolume;
    /** @private Flag indicating if audio should play automatically */
    private _autoPlay;
    /** @private Initial loop state set during construction */
    private _initialLoop;
    /** @private Web Audio API context */
    private _audioCtx;
    /** @private Internal state management object */
    private _states;
    /** @private Event emitter for handling audio events */
    private _emitter;
    /** @private Event handler for managing event subscriptions */
    private _eventHandler;
    /**
     * Creates an instance of Audio player.
     *
     * @param {AudioProp} config - The audio configuration object
     * @param {string} config.file - Path or URL to the audio file
     * @param {number} [config.volume=1] - Initial volume level (0 to 1)
     * @param {boolean} [config.autoPlay=false] - Whether to start playing automatically
     * @param {boolean} [config.loop=false] - Whether to loop the audio
     * @param {boolean} [config.preload=false] - Whether to preload the audio file
     */
    constructor({ file, volume, autoPlay, loop, preload }: AudioProp);
    /**
     * Fetches and decodes the audio buffer for the given source node.
     * @private
     * @param {AudioBufferSourceNode} source - The audio source node to load buffer into
     */
    private curryGetBuffer;
    /**
     * Starts or resumes audio playback.
     * If playback hasn't started, initializes audio source and begins playback.
     * If playback was paused, resumes from the current position.
     */
    play(): void;
    /**
     * Pauses audio playback by suspending the audio context.
     */
    pause(): void;
    /**
     * Toggles between play and pause states.
     */
    toggle(): void;
    /**
     * Stops audio playback completely.
     * Different from pause as it resets the playback position.
     */
    stop(): void;
    /**
     * Subscribes to audio events.
     * @param {AudioEvent} eventType - Type of event to listen for
     * @param {Function} callback - Function to call when event occurs
     */
    on(eventType: AudioEvent, callback: <T>(param: {
        [data: string]: T;
    }) => void): void;
    /**
     * Gets the current volume level.
     * @returns {number} Current volume value between 0 and 1
     */
    get volume(): number;
    /**
     * Sets the audio volume level.
     * @param {number} newVolume - New volume value between 0 and 1
     */
    set volume(newVolume: number);
    /**
     * Gets the current loop state.
     * @returns {boolean} Whether audio is set to loop
     */
    get loop(): boolean;
    /**
     * Sets the loop state.
     * @param {boolean} newLoop - Whether audio should loop
     */
    set loop(newLoop: boolean);
    /**
     * Gets the current state of the audio context.
     * @returns {AudioContextState} Current state of the audio context
     */
    get state(): AudioContextState;
    /**
     * Gets the current AudioContext instance.
     * @returns {AudioContext} The current AudioContext instance
     */
    get audioCtx(): AudioContext;
}
/**
 * Factory function to create a new Audio instance.
 *
 * @param {AudioPropType} props - The audio configuration properties
 * @returns {AudioType} A new Audio instance
 */
declare const _default: (props: AudioProp) => AudioClass;
export default _default;
