• Loads and initializes the WASM modules used by the HiFi Audio Nodes library. This must be called before using any other part of the library.

    Example

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

    await setupHRTF(audioContext, remoteSourceMoved);
    enableInlineMetadata(true);
    const listener = new HRTFOutput(audioContext);
    const limiter = new Limiter(audioContext);
    const destination = audioContext.createMediaStreamDestination();
    listener.connect(limiter).connect(destination);
    const audioElement = new Audio();
    audioElement.srcObject = destsination.stream;
    audioElement.play();

    Parameters

    • audioContext: AudioContext

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

    • remotePositionUpdateCallback: PositionUpdateCallback

      A function to call when a remote source changes their position.

    Returns Promise<void>

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