import { Component } from "../Component";
import { AudioClip } from "./AudioClip";
/**
 * Audio Source Component.
 */
export declare class AudioSource extends Component {
    /** If set to true, the audio component automatically begins to play on startup. */
    playOnEnabled: boolean;
    private _isPlaying;
    private _pendingPlay;
    private _clip;
    private _gainNode;
    private _sourceNode;
    private _pausedTime;
    private _playTime;
    private _volume;
    private _lastVolume;
    private _playbackRate;
    private _loop;
    /**
     * The audio clip to play.
     */
    get clip(): AudioClip;
    set clip(value: AudioClip);
    /**
     * Whether the clip playing right now.
     */
    get isPlaying(): boolean;
    /**
     * The volume of the audio source, ranging from 0 to 1.
     * @defaultValue `1`
     */
    get volume(): number;
    set volume(value: number);
    /**
     * The playback rate of the audio source.
     * @defaultValue `1`
     */
    get playbackRate(): number;
    set playbackRate(value: number);
    /**
     * Mutes or unmute the audio source.
     * Mute sets volume as 0, unmute restore volume.
     */
    get mute(): boolean;
    set mute(value: boolean);
    /**
     * Whether the audio clip looping.
     * @defaultValue `false`
     */
    get loop(): boolean;
    set loop(value: boolean);
    /**
     * Playback position in seconds.
     */
    get time(): number;
    /**
     * Play the clip.
     */
    play(): void;
    /**
     * Stops playing the clip.
     */
    stop(): void;
    /**
     * Pauses playing the clip.
     */
    pause(): void;
    private _onPlayEnd;
    private _startPlayback;
    private _initSourceNode;
    private _clearSourceNode;
    private _cancelPendingPlayback;
}
