Skip to content

Commit

Permalink
documentation for AudioModel, see #864
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Sep 21, 2022
1 parent eb24ecc commit 433e145
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions js/preferences/PreferencesModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ type BaseModelType = {
tandemName: string; // tandem name of the model, like "audioModel"
};

// Model for controls that appear in the "Simulation" panel of preferences
export type SimulationModel = BaseModelType & Required<SimulationPreferencesOptions>;

// Model for controls that appear in the "Visual" panel of preferences
export type VisualModel = BaseModelType & {

// Whether "Interactive Highlights" are enabled for the simulation. If enabled, focus highlights will appear around
Expand All @@ -131,15 +133,24 @@ export type VisualModel = BaseModelType & {
colorProfileProperty: Property<string>;
} & Required<VisualPreferencesOptions>;

// Model for controls that appear in the "Audio" panel of preferences
export type AudioModel = BaseModelType & {

// When false, no audio features are heard. See audioManager.ts for documentation about audio and sub features.
// TODO: To be renamed to audioEnabledProperty, see https://github.com/phetsims/joist/issues/864
simSoundEnabledProperty: Property<boolean>;
soundEnabledProperty: Property<boolean>;
extraSoundEnabledProperty: Property<boolean>;
voicingEnabledProperty: Property<boolean>;

// Whether sub-features of Voicing are enabled. See voicingManager and responseCollector for documentation about
// each of these features.
voicingMainWindowVoicingEnabledProperty: Property<boolean>;
voicingObjectResponsesEnabledProperty: Property<boolean>;
voicingContextResponsesEnabledProperty: Property<boolean>;
voicingHintResponsesEnabledProperty: Property<boolean>;

// Controls for the voice of SpeechSynthesisAnnouncer.ts
voicePitchProperty: NumberProperty;
voiceRateProperty: NumberProperty;
voiceProperty: Property<null | SpeechSynthesisVoice>;
Expand Down

0 comments on commit 433e145

Please sign in to comment.