import '../../../assert/js/assert.js';
import '../../../globals.js';
import Property from '../../../axon/js/Property.js';
import WrappedAudioBuffer from '../WrappedAudioBuffer.js';
import SoundGenerator, { SoundGeneratorOptions } from './SoundGenerator.js';
type SelfOptions = {
    loop?: boolean;
    trimSilence?: boolean;
    initialPlaybackRate?: number;
    initiateWhenDisabled?: boolean;
    rateChangesAffectPlayingSounds?: boolean;
};
export type SoundClipOptions = SelfOptions & SoundGeneratorOptions;
declare class SoundClip extends SoundGenerator {
    private readonly wrappedAudioBuffer;
    readonly loop: boolean;
    private readonly rateChangesAffectPlayingSounds;
    initiateWhenDisabled: boolean;
    private soundStart;
    private soundEnd;
    private readonly activeBufferSources;
    private readonly localGainNode;
    private _playbackRate;
    readonly isPlayingProperty: Property<boolean>;
    private timeOfDeferredPlayRequest;
    private readonly audioContextStateChangeListener;
    constructor(wrappedAudioBuffer: WrappedAudioBuffer, providedOptions?: SoundClipOptions);
    /**
     * Start playing the sound.
     */
    play(delay?: number): void;
    /**
     * Stop playing the sound.
     *
     * Note: Doing rapid stops and starts of a loop using this method can cause sound glitches.  If you have a need to
     * do that, use volume fades combined with zero delay stops.
     *
     * @param [delay] - The amount of time to wait before stopping, generally used to prevent sudden stops, which can
     * cause audible clicks.  If greater than zero, which it is by default, this method will try to fade out the sound
     * fully prior to stopping the audio playback.
     */
    stop(delay?: number): void;
    /**
     * Set the playback rate.  Based on the way this SoundClip was created, this may or may not affect in-progress sounds.
     */
    setPlaybackRate(playbackRate: number, timeConstant?: number): void;
    /**
     * Get the current playback rate.  Note that it is possible that there are audio buffers that are playing that are not
     * playing at the returned rate if the rate was recently changed.
     */
    getPlaybackRate(): number;
    /**
     * ES5 getter for playback rate
     */
    get playbackRate(): number;
    /**
     * Get a value that indicates whether sound is currently being played.
     */
    get isPlaying(): boolean;
    /**
     * Get the number of instances of the audio buffer that are currently playing.  This can be greater than one because
     * SoundClip supports multiple buffers playing at the same time.  This method is generally used to limit the number
     * of instances that are playing at the same time.
     */
    getNumberOfPlayingInstances(): number;
}
export default SoundClip;
//# sourceMappingURL=SoundClip.d.ts.map