Przeglądaj źródła

Merge pull request #9703 from jasonsturges/doc/audio

Audio documentation
sebavan 4 lat temu
rodzic
commit
f4ba4051ee

+ 1 - 1
src/Audio/Interfaces/IAudioEngine.ts

@@ -87,7 +87,7 @@ export interface IAudioEngine extends IDisposable {
 
     /**
      * Connect the audio engine to an audio analyser allowing some amazing
-     * synchornization between the sounds/music and your visualization (VuMeter for instance).
+     * synchronization between the sounds/music and your visualization (VuMeter for instance).
      * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#using-the-analyser
      * @param analyser The analyser to connect to the engine
      */

+ 2 - 2
src/Audio/audioEngine.ts

@@ -245,7 +245,7 @@ export class AudioEngine implements IAudioEngine {
     }
 
     /**
-     * Destroy and release the resources associated with the audio ccontext.
+     * Destroy and release the resources associated with the audio context.
      */
     public dispose(): void {
         if (this.canUseWebAudio && this._audioContextInitialized) {
@@ -291,7 +291,7 @@ export class AudioEngine implements IAudioEngine {
 
     /**
      * Connect the audio engine to an audio analyser allowing some amazing
-     * synchornization between the sounds/music and your visualization (VuMeter for instance).
+     * synchronization between the sounds/music and your visualization (VuMeter for instance).
      * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#using-the-analyser
      * @param analyser The analyser to connect to the engine
      */

+ 4 - 4
src/Audio/audioSceneComponent.ts

@@ -58,7 +58,7 @@ declare module "../scene" {
         _mainSoundTrack: SoundTrack;
         /**
          * The main sound track played by the scene.
-         * It cotains your primary collection of sounds.
+         * It contains your primary collection of sounds.
          */
         mainSoundTrack: SoundTrack;
         /**
@@ -253,7 +253,7 @@ export class AudioSceneComponent implements ISceneSerializableComponent {
     private static _CameraDirectionRH = new Vector3(0, 0, 1);
 
     /**
-     * The component name helpfull to identify the component in the list of scene components.
+     * The component name helpful to identify the component in the list of scene components.
      */
     public readonly name = SceneComponentConstants.NAME_AUDIO;
 
@@ -273,7 +273,7 @@ export class AudioSceneComponent implements ISceneSerializableComponent {
 
     private _headphone = false;
     /**
-     * Gets whether audio is outputing to headphone or not.
+     * Gets whether audio is outputting to headphone or not.
      * Please use the according Switch methods to change output.
      */
     public get headphone(): boolean {
@@ -379,7 +379,7 @@ export class AudioSceneComponent implements ISceneSerializableComponent {
     }
 
     /**
-     * Disposes the component and the associated ressources.
+     * Disposes the component and the associated resources.
      */
     public dispose(): void {
         const scene = this.scene;

+ 4 - 4
src/Audio/sound.ts

@@ -624,7 +624,7 @@ export class Sound {
 
     /**
      * Sets the position of the emitter if spatial sound is enabled
-     * @param newPosition Defines the new posisiton
+     * @param newPosition Defines the new position
      */
     public setPosition(newPosition: Vector3): void {
         this._position = newPosition;
@@ -721,7 +721,7 @@ export class Sound {
                         // required to manage properly the new suspended default state of Chrome
                         // When the option 'streaming: true' is used, we need first to wait for
                         // the audio engine to be unlocked by a user gesture before trying to play
-                        // an HTML Audio elememt
+                        // an HTML Audio element
                         var tryToPlay = () => {
                             if (Engine.audioEngine.unlocked) {
                                 var playPromise = this._htmlAudioElement.play();
@@ -1078,11 +1078,11 @@ export class Sound {
     }
 
     /**
-     * Parse a JSON representation of a sound to innstantiate in a given scene
+     * Parse a JSON representation of a sound to instantiate in a given scene
      * @param parsedSound Define the JSON representation of the sound (usually coming from the serialize method)
      * @param scene Define the scene the new parsed sound should be created in
      * @param rootUrl Define the rooturl of the load in case we need to fetch relative dependencies
-     * @param sourceSound Define a cound place holder if do not need to instantiate a new one
+     * @param sourceSound Define a sound place holder if do not need to instantiate a new one
      * @returns the newly parsed sound
      */
     public static Parse(parsedSound: any, scene: Scene, rootUrl: string, sourceSound?: Sound): Sound {

+ 3 - 3
src/Audio/soundTrack.ts

@@ -89,7 +89,7 @@ export class SoundTrack {
 
     /**
      * Adds a sound to this sound track
-     * @param sound define the cound to add
+     * @param sound define the sound to add
      * @ignoreNaming
      */
     public addSound(sound: Sound): void {
@@ -114,7 +114,7 @@ export class SoundTrack {
 
     /**
      * Removes a sound to this sound track
-     * @param sound define the cound to remove
+     * @param sound define the sound to remove
      * @ignoreNaming
      */
     public removeSound(sound: Sound): void {
@@ -162,7 +162,7 @@ export class SoundTrack {
 
     /**
      * Connect the sound track to an audio analyser allowing some amazing
-     * synchornization between the sounds/music and your visualization (VuMeter for instance).
+     * synchronization between the sounds/music and your visualization (VuMeter for instance).
      * @see https://doc.babylonjs.com/how_to/playing_sounds_and_music#using-the-analyser
      * @param analyser The analyser to connect to the engine
      */

+ 1 - 1
src/Audio/weightedsound.ts

@@ -55,7 +55,7 @@ export class WeightedSound {
     }
 
     /**
-     * The size of cone in degress for a directional sound in which there will be no attenuation.
+     * The size of cone in degrees for a directional sound in which there will be no attenuation.
      */
     public set directionalConeInnerAngle(value: number) {
         if (value !== this._coneInnerAngle) {