updateBarHeights(){
    let soundLevel = 0;
    
    for (let i = 0; i < this._numberOfBars; i++){
      if((this.soundDataArray === undefined) === false){
        
        soundLevel = this.getSampleOfSoundData(i, this._numberOfBars); 
        
        this.bars[i] = soundLevel;
      } else {
        this.bars[i] = 0;
      }
      
      if (this._paused === true && this._waitingAnimation === true){
        this.bars[i] = 0.5 + Math.sin((this.updateRequests+i*4*Math.PI)/this._numberOfBars)/4;
      }
    }
  }
/**
   * Takes the frequency data from the soundDataArray and processes it into bars.
   * If the music is paused and waitingAnimation is true, bars is updated accordingly.
   */
Takes the frequency data from the soundDataArray and processes it into bars.
If the music is paused and waitingAnimation is true, bars is updated accordingly.
Takes the frequency data from the soundDataArray and processes it into bars . If the music is paused and waitingAnimation is true bars is updated accordingly .
updateBarHeights(){
    let soundLevel = 0;
    for (let i = 0; i < this._numberOfBars; i++){
      if((this.soundDataArray === undefined) === false){
        soundLevel = this.getSampleOfSoundData(i, this._numberOfBars); 
        this.bars[i] = soundLevel;
      } else {
        this.bars[i] = 0;
      }
      if (this._paused === true && this._waitingAnimation === true){
        this.bars[i] = 0.5 + Math.sin((this.updateRequests+i*4*Math.PI)/this._numberOfBars)/4;
      }
    }
  }
updateBarHeights ( ) { let soundLevel = 0 ; for ( let i = 0 ; i < this . _numberOfBars ; i ++ ) { if ( ( this . soundDataArray === undefined ) === false ) { soundLevel = this . getSampleOfSoundData ( i , this . _numberOfBars ) ; this . bars [ i ] = soundLevel ; } else { this . bars [ i ] = 0 ; } if ( this . _paused === true && this . _waitingAnimation === true ) { this . bars [ i ] = 0.5 + Math . sin ( ( this . updateRequests + i * 4 * Math . PI ) / this . _numberOfBars ) / 4 ; } } }
Takes the frequency data from the soundDataArray and processes it into bars.
Takes the frequency data from the soundDataArray and processes it into bars .