O'Reilly logo

Learn ARCore - Fundamentals of Google ARCore by Micheal Lanham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Resonance Audio

Google developed Resonance Audio as a tool for developers who need to include 3D spatial audio in their AR and VR applications. We will use this tool to put 3D sound in our demo app. Let's get started by opening up the spawn-at-surface.html file in your favorite text editor and then follow the given steps:

  1. Locate the beginning of the JavaScript and add the following lines in the variable declarations:
var cube;  //after this linevar audioContext;var resonanceAudioScene;var audioElement;var audioElementSource;var audio;
  1. Now, scroll down to just before the update function and start a new function called initAudio, like this:
function initAudio(){}function update(){  //before this function
  1. Next, we need to initialize an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required