Skip to main content
Version: 12 Dec 2024

Audio

APIs for the Audio Service. More...

Modules

Name
Audio Definitions

Detailed Description

APIs for the Audio Service.

The audio capture capabilities of the Audio Service include capturing:

  • Mono mic signal focused on the user's voice (Voice Comm & Voice Capture).
  • Stereo mic signal of the ambient environment (World Capture).
  • Stereo mix of the audio output currently being rendered (Virtual Capture).
  • Six-channel mix of unprocessed raw mic data (Raw Mics & AEC Reference).
  • Mix of voice capture, world capture and virtual capture (Mixed Capture).

To initiate a capture input, the client allocates an 'input' using one of the create functions, followed by a 'start' call to initiate the input. The audio input streaming can be accomplished either by polling or callbacks.

The audio render capabilities for the Audio Service include rendering:

  • An audio file fully loaded into memory (Loaded File).
  • An audio file streamed from flash memory in chunks (Streamed File).
  • A buffered stream of audio output (Buffered Output).

To initiate a render output, the client allocates a 'sound' using one of the create functions, followed by a 'start' call to play the audio. For the first two rendering options, the audio file can either be passed to the create function of a specific sound, or pre-loaded as a persistent 'resource' to be used by multiple sounds that get created and destroyed. For the third rendering option, buffered streaming can be accomplished either by polling or callbacks. For sounds where audio spatialization is desired, the client must enable 'spatial sound' for that sound and set its position along with other optional spatial sound parameters.

Shared Object:

  • audio.magicleap*