import '../../chipper/js/initialize-globals.js';
import '../../assert/js/assert.js';
import '../../tandem/js/PhetioIDUtils.js';
import '../../globals.js';
/**
 * A singleton object that registers sound generators, connects them to the audio output, and provides a number of
 * related services, such as:
 *  - main enable/disable
 *  - main gain control
 *  - enable/disable of sounds based on visibility of an associated Scenery node
 *  - enable/disable of sounds based on their assigned sonification level (e.g. "basic" or "extra")
 *  - gain control for sounds based on their assigned category, e.g. UI versus sim-specific sounds
 *  - a shared reverb unit to add some spatialization and make all sounds seem to originate with the same space
 *
 *  The singleton object must be initialized before sound generators can be added.
 *
 *  @author John Blanco (PhET Interactive Simulations)
 */
import BooleanProperty from '../../axon/js/BooleanProperty.js';
import TReadOnlyProperty from '../../axon/js/TReadOnlyProperty.js';
import PhetioObject from '../../tandem/js/PhetioObject.js';
import Tandem from '../../tandem/js/Tandem.js';
import SoundGenerator from './sound-generators/SoundGenerator.js';
import SoundLevelEnum from './SoundLevelEnum.js';
export type SoundGeneratorAddOptions = {
    categoryName?: string | null;
};
type SoundGeneratorInitializationOptions = {
    categories?: string[];
};
declare class SoundManager extends PhetioObject {
    readonly enabledProperty: BooleanProperty;
    readonly extraSoundEnabledProperty: BooleanProperty;
    private readonly soundGenerators;
    private _mainOutputLevel;
    private _reverbLevel;
    private readonly gainNodesForCategories;
    private readonly duckingProperties;
    initialized: boolean;
    private readonly soundGeneratorsAwaitingAdd;
    private mainGainNode;
    private convolver;
    private reverbGainNode;
    private dryGainNode;
    private duckingGainNode;
    constructor(tandem?: Tandem);
    /**
     * Initialize the sonification manager. This function must be invoked before any sound generators can be added.
     */
    initialize(simConstructionCompleteProperty: TReadOnlyProperty<boolean>, audioEnabledProperty: TReadOnlyProperty<boolean>, simVisibleProperty: TReadOnlyProperty<boolean>, simActiveProperty: TReadOnlyProperty<boolean>, simSettingPhetioStateProperty: TReadOnlyProperty<boolean>, providedOptions?: SoundGeneratorInitializationOptions): void;
    /**
     * Returns true if the specified soundGenerator has been previously added to the soundManager.
     */
    hasSoundGenerator(soundGenerator: SoundGenerator): boolean;
    /**
     * Add a sound generator.  This connects the sound generator to the audio path, puts it on the list of sound
     * generators, and creates and returns a unique ID.
     */
    addSoundGenerator(soundGenerator: SoundGenerator, providedOptions?: SoundGeneratorAddOptions): void;
    /**
     * Remove the specified sound generator.
     */
    removeSoundGenerator(soundGenerator: SoundGenerator): void;
    /**
     * Set the main output level for sounds.
     * @param level - valid values from 0 (min) through 1 (max)
     */
    setMainOutputLevel(level: number): void;
    set mainOutputLevel(outputLevel: number);
    get mainOutputLevel(): number;
    /**
     * Get the current output level setting.
     */
    getMainOutputLevel(): number;
    /**
     * Set the output level for the specified category of sound generator.
     * @param categoryName - name of category to which this invocation applies
     * @param outputLevel - valid values from 0 through 1
     */
    setOutputLevelForCategory(categoryName: string, outputLevel: number): void;
    /**
     * Add a ducking Property.  When any of the ducking Properties are true, the output level will be "ducked", meaning
     * that it will be reduced.
     */
    addDuckingProperty(duckingProperty: TReadOnlyProperty<boolean>): void;
    /**
     * Remove a ducking Property that had been previously added.
     */
    removeDuckingProperty(duckingProperty: TReadOnlyProperty<boolean>): void;
    /**
     * Get the output level for the specified sound generator category.
     * @param categoryName - name of category to which this invocation applies
     */
    getOutputLevelForCategory(categoryName: string): number;
    /**
     * Set the amount of reverb.
     * @param newReverbLevel - value from 0 to 1, 0 = totally dry, 1 = wet
     */
    setReverbLevel(newReverbLevel: number): void;
    set reverbLevel(reverbLevel: number);
    get reverbLevel(): number;
    getReverbLevel(): number;
    set enabled(enabled: boolean);
    get enabled(): boolean;
    set sonificationLevel(sonificationLevel: SoundLevelEnum);
    /**
     * ES5 getter for sonification level
     */
    get sonificationLevel(): SoundLevelEnum;
    /**
     * Log the value of the gain parameter at every animation frame for the specified duration.  This is useful for
     * debugging, because these parameters change over time when set using methods like "setTargetAtTime", and the
     * details of how they change seems to be different on the different browsers.
     *
     * It may be possible to remove this method someday once the behavior is more consistent across browsers.  See
     * https://github.com/phetsims/resistance-in-a-wire/issues/205 for some history on this.
     *
     * @param gainNode
     * @param duration - duration for logging, in seconds
     */
    logGain(gainNode: GainNode, duration: number): void;
    /**
     * Log the value of the main gain as it changes, used primarily for debug.
     * @param duration - in seconds
     */
    logMainGain(duration: number): void;
    /**
     * Log the value of the reverb gain as it changes, used primarily for debug.
     * @param duration - duration for logging, in seconds
     */
    logReverbGain(duration: number): void;
}
declare const soundManager: SoundManager;
export default soundManager;
//# sourceMappingURL=soundManager.d.ts.map