Reality Mixer - Augmented Audio  1.0
Add seamless spatial audio to your augmented experiences
Public Member Functions | Public Attributes | List of all members
FIcontent.Gaming.Enabler.RealityMixer.AugmentedAudio.RealityMixerAugmentedAudio Class Reference

This is the main enabler class and handles seeamless mixing of 3D spatial audio sources given user location and audio source location USE_TBE Are we using the TwoBigEars 3DCeption binaural 3D audio library? USE_POI Are we using the FIContent.Gaming.Enabler.POI-Interface enabler? More...

Inherits MonoBehaviour.

Public Member Functions

void Start ()
 Initiates the setup for location, current audio source and enables the compass for determining direction of audio More...
 
int PersistentIdFromPoI (Location loc, int modulus)
 This function computes a unique geospatial hash for the given location (with POI-Server enabler, or class) More...
 
double GPSBearing (double lat1, double lng1, double lat2, double lng2)
 Computes the bearing between two provided GPS locations with reasonably accurate trigonometry (sufficient for audio directional resolution) More...
 
double RelativeHeading (double hd1, double hd2)
 Computes the relative heading between bearings with wrapping handling More...
 
Vector3 ProjectAudioLocation (double relativeHeading, double dist)
 Projects the audio location according to the users current local coordinate frame along the plane of the user's ears More...
 
void ProcessAudioSource ()
 This function processes augmented audio sources. With the tracked user's Location and database of audio source and their locations the enabler computes the relative heading betwee the user and the nearest source and plays the media with 3D spatailised audio More...
 
void Update ()
 The update function progresses the frame based timer for an example of triggering regular (with variance) audio vocalisations from the database More...
 

Public Attributes

AudioClip[] vocalArray
 The vocal utterance array to be aurally displayed in 3D More...
 

Detailed Description

This is the main enabler class and handles seeamless mixing of 3D spatial audio sources given user location and audio source location USE_TBE Are we using the TwoBigEars 3DCeption binaural 3D audio library? USE_POI Are we using the FIContent.Gaming.Enabler.POI-Interface enabler?

Member Function Documentation

double FIcontent.Gaming.Enabler.RealityMixer.AugmentedAudio.RealityMixerAugmentedAudio.GPSBearing ( double  lat1,
double  lng1,
double  lat2,
double  lng2 
)

Computes the bearing between two provided GPS locations with reasonably accurate trigonometry (sufficient for audio directional resolution)

Returns
The double precision absolute bearing against north, as an angle in radians
Parameters
lat1Double precision latitude first location
lng1Double precision longitude first location
lat2Double precision latitude second location
lng2Double precision longitude second location
int FIcontent.Gaming.Enabler.RealityMixer.AugmentedAudio.RealityMixerAugmentedAudio.PersistentIdFromPoI ( Location  loc,
int  modulus 
)

This function computes a unique geospatial hash for the given location (with POI-Server enabler, or class)

Returns
The geospatial hash code.
Parameters
locProvides the location to compute a global unique persistent code.
modulusProvides control over the modulo hashing function.
void FIcontent.Gaming.Enabler.RealityMixer.AugmentedAudio.RealityMixerAugmentedAudio.ProcessAudioSource ( )

This function processes augmented audio sources. With the tracked user's Location and database of audio source and their locations the enabler computes the relative heading betwee the user and the nearest source and plays the media with 3D spatailised audio

Vector3 FIcontent.Gaming.Enabler.RealityMixer.AugmentedAudio.RealityMixerAugmentedAudio.ProjectAudioLocation ( double  relativeHeading,
double  dist 
)

Projects the audio location according to the users current local coordinate frame along the plane of the user's ears

Returns
A single precision (sufficiently precise) vector direction and magnitude of the audio location
Parameters
relativeHeadingRelative heading.
distGeospatial disance
double FIcontent.Gaming.Enabler.RealityMixer.AugmentedAudio.RealityMixerAugmentedAudio.RelativeHeading ( double  hd1,
double  hd2 
)

Computes the relative heading between bearings with wrapping handling

Returns
The heading in double precision floating point
Parameters
hd1The first heading to compare
hd2The second heading to compare
void FIcontent.Gaming.Enabler.RealityMixer.AugmentedAudio.RealityMixerAugmentedAudio.Start ( )

Initiates the setup for location, current audio source and enables the compass for determining direction of audio

void FIcontent.Gaming.Enabler.RealityMixer.AugmentedAudio.RealityMixerAugmentedAudio.Update ( )

The update function progresses the frame based timer for an example of triggering regular (with variance) audio vocalisations from the database

Member Data Documentation

AudioClip [] FIcontent.Gaming.Enabler.RealityMixer.AugmentedAudio.RealityMixerAugmentedAudio.vocalArray

The vocal utterance array to be aurally displayed in 3D