ServerConfiguration/Calla/Calla-Lib/game/bundle.js
/**
     * Performs the spatialization operation for the audio source's latest location.
     * @param {Pose} loc
     * @fires BaseAnalyzedSpatializer#audioActivity
     */
Performs the spatialization operation for the audio source's latest location.
@param {Pose} loc
@fires BaseAnalyzedSpatializer#audioActivity
Performs the spatialization operation for the audio source ' s latest location . @param { Pose } loc @fires BaseAnalyzedSpatializer#audioActivity
update(loc) {
        super.update(loc);
        if (this.analyser && this.source) {
            this.analyser.getFloatFrequencyData(this.buffer);
            const average = 1.1 + analyserFrequencyAverage(this.analyser, this.buffer, 85, 255, this.bufferSize) / 100;
            if (average >= 0.5 && this.activityCounter < activityCounterMax) {
                this.activityCounter++;
            } else if (average < 0.5 && this.activityCounter > activityCounterMin) {
                this.activityCounter--;
            }
            const isActive = this.activityCounter > activityCounterThresh;
            if (this.wasActive !== isActive) {
                this.wasActive = isActive;
                audioActivityEvt.id = this.id;
                audioActivityEvt.isActive = isActive;
                this.dispatchEvent(audioActivityEvt);
            }
        }
    }
update ( loc ) { super . update ( loc ) ; if ( this . analyser && this . source ) { this . analyser . getFloatFrequencyData ( this . buffer ) ; const average = 1.1 + analyserFrequencyAverage ( this . analyser , this . buffer , 85 , 255 , this . bufferSize ) / 100 ; if ( average >= 0.5 && this . activityCounter < activityCounterMax ) { this . activityCounter ++ ; } else if ( average < 0.5 && this . activityCounter > activityCounterMin ) { this . activityCounter -- ; } const isActive = this . activityCounter > activityCounterThresh ; if ( this . wasActive !== isActive ) { this . wasActive = isActive ; audioActivityEvt . id = this . id ; audioActivityEvt . isActive = isActive ; this . dispatchEvent ( audioActivityEvt ) ; } } }
Performs the spatialization operation for the audio source's latest location.
Performs the spatialization operation for the audio source ' s latest location .