diff --git a/js/WrappedAudioBuffer.ts b/js/WrappedAudioBuffer.ts index c3de0b7c..204b1222 100644 --- a/js/WrappedAudioBuffer.ts +++ b/js/WrappedAudioBuffer.ts @@ -1,7 +1,5 @@ // Copyright 2020-2021, University of Colorado Boulder -// @ts-nocheck - /** * WrappedAudioBuffer is an object that contains a Web Audio AudioBuffer and a TinyProperty that indicates whether the * audio buffer has been decoded. This is *only* intended for usage during the loading process, not during run time, @@ -15,15 +13,17 @@ import TinyProperty from '../../axon/js/TinyProperty.js'; class WrappedAudioBuffer { + // This TinyProperty is set to null during construction. Later, when audio data is loaded and decoded, the client + // should set this to the resultant AudioBuffer. Once this is set to an AudioBuffer, it should not be set again. + public readonly audioBufferProperty: TinyProperty; + constructor() { - // @public {TinyProperty.} - A TinyProperty that is initially set to null and is set to an audio - // buffer, which contains audio data, when the decoding of that data is complete. - this.audioBufferProperty = new TinyProperty( null ); + this.audioBufferProperty = new TinyProperty( null ); // Make sure that the audio buffer is only ever set once. assert && this.audioBufferProperty.lazyLink( ( audioBuffer, previousAudioBuffer ) => { - assert( previousAudioBuffer === null && audioBuffer !== null, 'The audio buffer can only be set once' ); + assert && assert( previousAudioBuffer === null && audioBuffer !== null, 'The audio buffer can only be set once' ); } ); } } diff --git a/sounds/demo-and-test/sliderClick01_mp3.js b/sounds/demo-and-test/sliderClick01_mp3.js index 4ec71946..8a67bbab 100644 --- a/sounds/demo-and-test/sliderClick01_mp3.js +++ b/sounds/demo-and-test/sliderClick01_mp3.js @@ -1,5 +1,3 @@ -// Copyright 2022, University of Colorado Boulder - /* eslint-disable */ import asyncLoader from '../../../phet-core/js/asyncLoader.js'; import base64SoundToByteArray from '../../../tambo/js/base64SoundToByteArray.js'; diff --git a/sounds/demo-and-test/sliderClick02_mp3.js b/sounds/demo-and-test/sliderClick02_mp3.js index 5c714696..08f57012 100644 --- a/sounds/demo-and-test/sliderClick02_mp3.js +++ b/sounds/demo-and-test/sliderClick02_mp3.js @@ -1,5 +1,3 @@ -// Copyright 2022, University of Colorado Boulder - /* eslint-disable */ import asyncLoader from '../../../phet-core/js/asyncLoader.js'; import base64SoundToByteArray from '../../../tambo/js/base64SoundToByteArray.js';