ServerConfiguration/Calla/Calla-Lib/js/src/audio/AudioManager.js
/**
     * Creates a new sound effect from a series of fallback paths
     * for media files.
     * @param {string} name - the name of the sound effect, to reference when executing playback.
     * @param {string[]} paths - a series of fallback paths for loading the media of the sound effect.
     * @returns {AudioManager}
     */
Creates a new sound effect from a series of fallback paths
for media files.
@param {string} name - the name of the sound effect, to reference when executing playback.
@param {string[]} paths - a series of fallback paths for loading the media of the sound effect.
Creates a new sound effect from a series of fallback paths for media files . @param { string } name - the name of the sound effect to reference when executing playback . @param { string [] } paths - a series of fallback paths for loading the media of the sound effect .
addClip(name, ...paths) {
        const pose = new InterpolatedPose();
        const sources = paths
            .map((p) => {
                const s = document.createElement("source");
                s.src = p;
                return s;
            });
        const elem = document.createElement("audio");
        elem.controls = false;
        elem.playsInline = true;
        elem.append(...sources);
        this.createSpatializer(name, elem)
            .then((source) => pose.spatializer = source);
        this.clips.set(name, pose);
        return this;
    }
addClip ( name , ... paths ) { const pose = new InterpolatedPose ( ) ; const sources = paths . map ( ( p ) => { const s = document . createElement ( "source" ) ; s . src = p ; return s ; } ) ; const elem = document . createElement ( "audio" ) ; elem . controls = false ; elem . playsInline = true ; elem . append ( ... sources ) ; this . createSpatializer ( name , elem ) . then ( ( source ) => pose . spatializer = source ) ; this . clips . set ( name , pose ) ; return this ; }
Creates a new sound effect from a series of fallback paths
 for media files.
Creates a new sound effect from a series of fallback paths for media files .