• Call setupHRTF to load and initialize WASM modules


    function remoteSourceMoved(uid, x, y, o) {
    // ...

    await setupHRTF(audioContext, remoteSourceMoved);
    let listener = new HRTFOutput(audioContext);
    let limiter = new Limiter(audioContext);
    let dst = audioContext.createMediaStreamDestination();
    let audioElement = new Audio();
    audioElement.srcObject = dst.stream;


    • audioContext: AudioContext

      The AudioContext to use. It should be created with a sample rate of 48000.

    • setRemoteSourcePositionUpdate: Function

      A callback function for when remote Sources change their position. The callback takes parameters (uid : string, x : number, y : number, o : number). The uid is from a previous call to setupReceiverMetadata. x and y are in meters, o is in radians.

    Returns Promise<void>

© 2023 High Fidelity, Inc. | All rights reserved Terms of Service | Privacy Policy