This website uses cookies to improve our services and deliver relevant ads.
By interacting with this site, you agree to this use. For more information, see our Cookies Policy

Audio 1.24 Reference Guide

OVR_Audio.h File Reference

OVR Audio SDK public header file.

Macros

#define
OVR_RESULT_DEFINED
Result type used by the OVRAudio API.
#define
OVR_SUCCESS_DEFINED
Success is zero, while all error types are non-zero values.
#define
ovrSuccess
#define
OVR_AUDIO_MAJOR_VERSION
#define
OVR_AUDIO_MINOR_VERSION
#define
OVR_AUDIO_PATCH_VERSION

Enumerations

enum
ovrAudioError {
}
Enumerates error codes that can be returned by OVRAudio.
enum
ovrAudioSourceFlag {
}
Audio source flags.
enum
ovrAudioSourceAttenuationMode {
}
Audio source attenuation mode.
enum
ovrAudioEnable {
}
Global boolean flags.
enum
ovrAudioHRTFInterpolationMethod {
}
Internal use only.
enum
ovrAudioSpatializationStatus {
}
Status mask returned by spatializer APIs.
enum
ovrAudioHeadphones {
}
Headphone models used for correction.
enum
ovrAudioPerformanceCounter {
}
Performance counter enumerants.
enum
ovrAudioAmbisonicFormat {
}
Ambisonic formats.
enum
ovrAudioAmbisonicSpeakerLayout {
}
Virtual speaker layouts for ambisonics.

Typedefs

int32_t
struct ovrPosef_
struct ovrPoseStatef_
struct ovrAudioSource_
Opaque type definitions for audio source and context.
struct ovrAudioContext_ *
struct ovrAudioAmbisonicStream_ *
void *
struct _ovrAudioPrivateAPI
Opaque type used for access to private/hidden functions.

Functions

ovrResult
DEPRECATED Initialize OVRAudio.
void
DEPRECATED Shutdown OVRAudio.
OVRA_EXPORT const char *
ovrAudio_GetVersion ( int * Major, int * Minor, int * Patch )
Return library's built version information.
OVRA_EXPORT float *
ovrAudio_AllocSamples ( int NumSamples )
Allocate properly aligned buffer to store samples.
OVRA_EXPORT void
ovrAudio_FreeSamples ( float * Samples )
Free previously allocated buffer.
OVRA_EXPORT ovrResult
ovrAudio_GetTransformFromPose ( const ovrPosef * Pose, float * Vx, float * Vy, float * Vz, float * Pos )
Retrieve a transformation from an ovrPosef.
OVRA_EXPORT ovrResult
ovrAudio_CreateContext ( ovrAudioContext * pContext, const ovrAudioContextConfiguration * pConfig )
Create an audio context for spatializing incoming sounds.
OVRA_EXPORT void
ovrAudio_DestroyContext ( ovrAudioContext Context )
Destroy a previously created audio context.
OVRA_EXPORT ovrResult
ovrAudio_Enable ( ovrAudioContext Context, ovrAudioEnable What, int Enable )
Enable/disable options in the audio context.
OVRA_EXPORT ovrResult
ovrAudio_IsEnabled ( ovrAudioContext Context, ovrAudioEnable What, int * pEnabled )
Query option status in the audio context.
OVRA_EXPORT ovrResult
ovrAudio_SetHRTFInterpolationMethod ( ovrAudioContext Context, ovrAudioHRTFInterpolationMethod InterpolationMethod )
Set HRTF interpolation method.
OVRA_EXPORT ovrResult
ovrAudio_GetHRTFInterpolationMethod ( ovrAudioContext Context, ovrAudioHRTFInterpolationMethod * pInterpolationMethod )
Get HRTF interpolation method.
OVRA_EXPORT ovrResult
ovrAudio_SetSimpleBoxRoomParameters ( ovrAudioContext Context, const ovrAudioBoxRoomParameters * Parameters )
Set box room parameters for reverberation.
OVRA_EXPORT ovrResult
ovrAudio_GetSimpleBoxRoomParameters ( ovrAudioContext Context, ovrAudioBoxRoomParameters * Parameters )
Get box room parameters for current reverberation.
OVRA_EXPORT ovrResult
ovrAudio_SetListenerVectors ( ovrAudioContext Context, float PositionX, float PositionY, float PositionZ, float ForwardX, float ForwardY, float ForwardZ, float UpX, float UpY, float UpZ )
Sets the listener's pose state as vectors.
OVRA_EXPORT ovrResult
ovrAudio_GetListenerVectors ( ovrAudioContext Context, float * pPositionX, float * pPositionY, float * pPositionZ, float * pForwardX, float * pForwardY, float * pForwardZ, float * pUpX, float * pUpY, float * pUpZ )
Gets the listener's pose state as vectors.
OVRA_EXPORT ovrResult
ovrAudio_SetListenerPoseStatef ( ovrAudioContext Context, const ovrPoseStatef * PoseState )
Sets the listener's pose state.
OVRA_EXPORT ovrResult
ovrAudio_ResetAudioSource ( ovrAudioContext Context, int Sound )
Reset an audio source's state.
OVRA_EXPORT ovrResult
ovrAudio_SetAudioSourcePos ( ovrAudioContext Context, int Sound, float X, float Y, float Z )
Sets the position of an audio source.
OVRA_EXPORT ovrResult
ovrAudio_GetAudioSourcePos ( ovrAudioContext Context, int Sound, float * pX, float * pY, float * pZ )
Gets the position of an audio source.
OVRA_EXPORT ovrResult
ovrAudio_SetAudioSourceRange ( ovrAudioContext Context, int Sound, float RangeMin, float RangeMax )
Sets the min and max range of the audio source.
OVRA_EXPORT ovrResult
ovrAudio_GetAudioSourceRange ( ovrAudioContext Context, int Sound, float * pRangeMin, float * pRangeMax )
Gets the min and max range of the audio source.
OVRA_EXPORT ovrResult
ovrAudio_SetAudioSourceRadius ( ovrAudioContext Context, int Sound, float Radius )
Sets the radius of the audio source for volumetric sound sources.
OVRA_EXPORT ovrResult
ovrAudio_GetAudioSourceRadius ( ovrAudioContext Context, int Sound, float * pRadius )
Gets the radius of the audio source for volumetric sound sources.
OVRA_EXPORT ovrResult
ovrAudio_SetAudioSourceFlags ( ovrAudioContext Context, int Sound, uint32_t Flags )
Sets an audio source's flags.
OVRA_EXPORT ovrResult
ovrAudio_GetAudioSourceFlags ( ovrAudioContext Context, int Sound, uint32_t * pFlags )
Gets an audio source's flags.
OVRA_EXPORT ovrResult
ovrAudio_SetAudioSourceDirectionRESERVED ( ovrAudioContext Context, int Sound, float VX, float VY, float VZ, float Angle )
Sets the direction of an audio source.
OVRA_EXPORT ovrResult
ovrAudio_SetAudioSourceAttenuationMode ( ovrAudioContext Context, int Sound, ovrAudioSourceAttenuationMode Mode, float FixedScale )
Set the attenuation mode for a sound source.
OVRA_EXPORT ovrResult
ovrAudio_GetAudioSourceAttenuationMode ( ovrAudioContext Context, int Sound, ovrAudioSourceAttenuationMode * pMode, float * pFixedScale )
Get the attenuation mode for a sound source.
OVRA_EXPORT ovrResult
ovrAudio_SpatializeMonoSourceInterleaved ( ovrAudioContext Context, int Sound, uint32_t * OutStatus, float * Dst, const float * Src )
Spatialize a mono audio source to interleaved stereo output.
OVRA_EXPORT ovrResult
ovrAudio_SpatializeMonoSourceLR ( ovrAudioContext Context, int Sound, uint32_t * OutStatus, float * DstLeft, float * DstRight, const float * Src )
Spatialize a mono audio source to separate left and right output buffers.
OVRA_EXPORT ovrResult
ovrAudio_SetHeadphoneModel ( ovrAudioContext Context, ovrAudioHeadphones Model, const float * ImpulseResponse, int NumSamples )
Set the headphone model used by the headphone correction algorithm.
OVRA_EXPORT ovrResult
ovrAudio_GetHeadphoneModel ( ovrAudioContext Context, ovrAudioHeadphones * pModel, const float ** pImpulseResponse, int * pNumSamples )
Get the headphone model used by the headphone correction algorithm.
OVRA_EXPORT ovrResult
ovrAudio_ApplyHeadphoneCorrection ( ovrAudioContext Context, float * OutLeft, float * OutRight, const float * InLeft, const float * InRight, int NumSamples )
Apply headphone correction algorithm to stereo buffer.
OVRA_EXPORT ovrResult
ovrAudio_MixInSharedReverbLR ( ovrAudioContext Context, uint32_t * OutStatus, float * DstLeft, float * DstRight )
Mix shared reverb into buffer.
OVRA_EXPORT ovrResult
ovrAudio_MixInSharedReverbInterleaved ( ovrAudioContext Context, uint32_t * OutStatus, float * DstInterleaved )
Mix shared reverb into interleaved buffer.
OVRA_EXPORT ovrResult
ovrAudio_SetSharedReverbRange ( ovrAudioContext Context, float RangeMin, float RangeMax )
Sets the min and max range of the shared reverb.
OVRA_EXPORT ovrResult
ovrAudio_GetSharedReverbRange ( ovrAudioContext Context, float * pRangeMin, float * pRangeMax )
Gets the min and max range of the shared reverb.
OVRA_EXPORT ovrResult
ovrAudio_SetHeadRadius ( ovrAudioContext Context, float HeadRadius )
Set user headRadius.
OVRA_EXPORT ovrResult
ovrAudio_GetHeadRadius ( ovrAudioContext Context, float * HeadRadius )
Set user configuration.
OVRA_EXPORT ovrResult
ovrAudio_GetPrivateAPI ( ovrAudioContext Context, ovrAudioPrivateAPI * Dst )
OVRA_EXPORT ovrResult
ovrAudio_GetPerformanceCounter ( ovrAudioContext Context, ovrAudioPerformanceCounter Counter, int64_t * Count, double * TimeMicroSeconds )
Retrieve a performance counter.
OVRA_EXPORT ovrResult
ovrAudio_ResetPerformanceCounter ( ovrAudioContext Context, ovrAudioPerformanceCounter Counter )
Reset a performance counter.
OVRA_EXPORT ovrResult
ovrAudio_ProcessQuadBinaural ( const float * ForwardLR, const float * RightLR, const float * BackLR, const float * LeftLR, float LookDirectionX, float LookDirectionY, float LookDirectionZ, int NumSamples, float * Dst )
Quad-binaural spatialization.
OVRA_EXPORT ovrResult
ovrAudio_CreateAmbisonicStream ( ovrAudioContext Context, int SampleRate, int AudioBufferLength, ovrAudioAmbisonicFormat format, int ambisonicOrder, ovrAudioAmbisonicStream * pAmbisonicStream )
Create an ambisonic stream instance for spatializing B-format ambisonic audio.
OVRA_EXPORT ovrResult
ovrAudio_ResetAmbisonicStream ( ovrAudioAmbisonicStream AmbisonicStream )
Reset a previously created ambisonic stream for re-use.
OVRA_EXPORT ovrResult
ovrAudio_DestroyAmbisonicStream ( ovrAudioAmbisonicStream AmbisonicStream )
Destroy a previously created ambisonic stream.
OVRA_EXPORT ovrResult
ovrAudio_SetAmbisonicSpeakerLayout ( ovrAudioAmbisonicStream AmbisonicStream, ovrAudioAmbisonicSpeakerLayout Layout )
Sets the virtual speaker layout for the ambisonic stream.
OVRA_EXPORT ovrResult
ovrAudio_GetAmbisonicSpeakerLayout ( ovrAudioAmbisonicStream AmbisonicStream, ovrAudioAmbisonicSpeakerLayout * Layout )
Sets the virtual speaker layout for the ambisonic stream.
OVRA_EXPORT ovrResult
ovrAudio_MonoToAmbisonic ( const float * InMono, float DirectionX, float DirectionY, float DirectionZ, ovrAudioAmbisonicFormat Format, int AmbisonicOrder, float * OutAmbisonic, int NumSamples )
Spatialize a mono in ambisonics.
OVRA_EXPORT ovrResult
ovrAudio_RenderAmbisonicSpeakerFeed ( const float * InAmbisonics, float DirectionX, float DirectionY, float DirectionZ, ovrAudioAmbisonicFormat Format, int AmbisonicOrder, float * SpeakerFeed, int NumSamples )
Render a speaker feed from ambisonics.
OVRA_EXPORT ovrResult
ovrAudio_ProcessAmbisonicStreamInterleaved ( ovrAudioContext Context, ovrAudioAmbisonicStream AmbisonicStream, const float * Src, float * Dst, int NumSamples )
Spatialize ambisonic stream.
OVRA_EXPORT ovrResult
ovrAudio_SetAmbisonicOrientation ( ovrAudioAmbisonicStream AmbisonicStream, float LookDirectionX, float LookDirectionY, float LookDirectionZ, float UpDirectionX, float UpDirectionY, float UpDirectionZ )
Set orientation for ambisonic stream.
OVRA_EXPORT ovrResult
ovrAudio_GetAmbisonicOrientation ( ovrAudioAmbisonicStream AmbisonicStream, float * pLookDirectionX, float * pLookDirectionY, float * pLookDirectionZ, float * pUpDirectionX, float * pUpDirectionY, float * pUpDirectionZ )
Get orientation for ambisonic stream.
OVRA_EXPORT ovrResult
ovrAudio_SetProfilerEnabled ( ovrAudioContext Context, int Enabled )
OVRA_EXPORT ovrResult
ovrAudio_SetProfilerPort ( ovrAudioContext , int Port )
OVRA_EXPORT ovrResult
ovrAudio_CreateSpectrumAnalyzer ( int ChannelCount, int WindowLength, int Overlap, ovrAudioSpectrumAnalyzer * pSpectrumAnalyzer )
OVRA_EXPORT ovrResult
ovrAudio_DestroySpectrumAnalyzer ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer )
OVRA_EXPORT ovrResult
ovrAudio_ResetSpectrumAnalyzer ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer )
OVRA_EXPORT ovrResult
ovrAudio_SpectrumAnalyzerProcessBufferInterleaved ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer, const float * Buffer, int LengthFrames )
OVRA_EXPORT ovrResult
ovrAudio_SpectrumAnalyzerGetSpectrumInterleaved ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer, float * Spectrum )
OVRA_EXPORT ovrResult
ovrAudio_SpectrumAnalyzerCalculateAmbisonicCoefficients ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer, float DirectionX, float DirectionY, float DirectionZ, float * Coefs )
OVRA_EXPORT ovrResult
ovrAudio_SpectrumAnalyzerGetSpectrumAmbisonic ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer, const float * Coefs, float * Spectrum )
OVRA_EXPORT ovrResult
ovrAudio_AssignRaycastCallback ( ovrAudioContext Context, OVRA_RAYCAST_CALLBACK Callback, void * pctx )
Assign a callback for raycasting into the game geometry.
OVRA_EXPORT ovrResult
ovrAudio_SetDynamicRoomRaysPerSecond ( ovrAudioContext Context, int RaysPerSecond )
Set the number of ray casts per second are used for dynamic modeling, more rays mean more accurate and responsive modelling but will reduce performance.
OVRA_EXPORT ovrResult
ovrAudio_SetDynamicRoomInterpSpeed ( ovrAudioContext Context, float InterpSpeed )
Set the speed which the dynamic room interpolates, higher values will update more quickly but less smooth.
OVRA_EXPORT ovrResult
ovrAudio_SetDynamicRoomMaxWallDistance ( ovrAudioContext Context, float MaxWallDistance )
Set the maximum distance to the wall for dynamic room modeling to constrain the size.
OVRA_EXPORT ovrResult
ovrAudio_SetDynamicRoomRaysRayCacheSize ( ovrAudioContext Context, int RayCacheSize )
Set the size of the cache which holds a history of the rays cast, a larger value will have more points making it more stable but less responsive.
OVRA_EXPORT ovrResult
ovrAudio_UpdateRoomModel ( ovrAudioContext Context, float WetLevel )
Update the dynamic room modeling, this will fire the ray cast calback and update the size of the room.
OVRA_EXPORT ovrResult
ovrAudio_GetRoomDimensions ( ovrAudioContext Context, float RoomDimensions, float ReflectionsCoefs, ovrAudioVector3f * Position )
Retrieves the dimensions of the dynamic room moel.
OVRA_EXPORT ovrResult
ovrAudio_GetRaycastHits ( ovrAudioContext Context, ovrAudioVector3f Points, ovrAudioVector3f Normals, int Length )
Retrieves the cache of ray cast hits that are being used to estimate the room, this is useful for debugging rays hitting the wrong objects.

Detailed Description

2015 Oculus VR, LLC All Rights reserved.

Macros Documentation

#define OVR_RESULT_DEFINED
Result type used by the OVRAudio API.
#define OVR_SUCCESS_DEFINED
Success is zero, while all error types are non-zero values.
#define ovrSuccess
#define OVR_AUDIO_MAJOR_VERSION
#define OVR_AUDIO_MINOR_VERSION
#define OVR_AUDIO_PATCH_VERSION

Enumeration Type Documentation

enum OVR_Audio.h.ovrAudioError
Enumerates error codes that can be returned by OVRAudio.
Enumerator
ovrError_AudioUnknown
An unknown error has occurred.
ovrError_AudioInvalidParam
An invalid parameter, e.g. NULL pointer or out of range variable, was passed.
ovrError_AudioBadSampleRate
An unsupported sample rate was declared.
ovrError_AudioMissingDLL
The DLL or shared library could not be found.
ovrError_AudioBadAlignment
Buffers did not meet 16b alignment requirements.
ovrError_AudioUninitialized
audio function called before initialization
ovrError_AudioHRTFInitFailure
HRTF provider initialization failed.
ovrError_AudioBadVersion
Mismatched versions between header and libs.
ovrError_AudioSymbolNotFound
Couldn't find a symbol in the DLL.
ovrError_SharedReverbDisabled
Late reverberation is disabled.
ovrError_AudioNoAvailableAmbisonicInstance= 2017
ovrError_AudioInternalEnd
Internal errors used by Audio SDK defined down towards public errors NOTE: Since we do not define a beginning range for Internal codes, make sure not to hard-code range checks (since that can vary based on build)
enum OVR_Audio.h.ovrAudioSourceFlag
Audio source flags.
Enumerator
ovrAudioSourceFlag_None= 0x0000
ovrAudioSourceFlag_WideBand_HINT
Wide band signal (music, voice, noise, etc.)
ovrAudioSourceFlag_NarrowBand_HINT
Narrow band signal (pure waveforms, e.g sine)
ovrAudioSourceFlag_BassCompensation_DEPRECATED
Compensate for drop in bass from HRTF (deprecated)
ovrAudioSourceFlag_DirectTimeOfArrival
Time of arrival delay for the direct signal.
ovrAudioSourceFlag_ReflectionsDisabled
Disable reflections and reverb for a single AudioSource.
ovrAudioSourceFlag_DisableResampling_RESERVED
Disable resampling IR to output rate, INTERNAL USE ONLY.
enum OVR_Audio.h.ovrAudioSourceAttenuationMode
Audio source attenuation mode.
Enumerator
ovrAudioSourceAttenuationMode_None
Sound is not attenuated, e.g. middleware handles attenuation.
ovrAudioSourceAttenuationMode_Fixed
Sound has fixed attenuation (passed to ovrAudio_SetAudioSourceAttenuationMode)
ovrAudioSourceAttenuationMode_InverseSquare
Sound uses internally calculated attenuation based on inverse square.
ovrAudioSourceAttenuationMode_COUNT
enum OVR_Audio.h.ovrAudioEnable
Global boolean flags.
Enumerator
ovrAudioEnable_None
None.
ovrAudioEnable_SimpleRoomModeling
Enable/disable simple room modeling globally, default: disabled.
ovrAudioEnable_LateReverberation
Late reverbervation, requires simple room modeling enabled.
ovrAudioEnable_RandomizeReverb
Randomize reverbs to diminish artifacts. Default: enabled.
ovrAudioEnable_PerSourceReverb
(legacy) Process the reverb per sound source
ovrAudioEnable_COUNT
enum OVR_Audio.h.ovrAudioHRTFInterpolationMethod
Internal use only.
Enumerator
ovrAudioHRTFInterpolationMethod_Nearest
ovrAudioHRTFInterpolationMethod_SimpleTimeDomain
ovrAudioHRTFInterpolationMethod_MinPhaseTimeDomain
ovrAudioHRTFInterpolationMethod_PhaseTruncation
ovrAudioHRTFInterpolationMethod_PhaseLerp
ovrAudioHRTFInterpolationMethod_COUNT
enum OVR_Audio.h.ovrAudioSpatializationStatus
Status mask returned by spatializer APIs.
Enumerator
ovrAudioSpatializationStatus_None
Nothing to report.
ovrAudioSpatializationStatus_Finished
Buffer is empty and sound processing is finished.
ovrAudioSpatializationStatus_Working
Data still remains in buffer (e.g. reverberation tail)
enum OVR_Audio.h.ovrAudioHeadphones
Headphone models used for correction.
Enumerator
ovrAudioHeadphones_None
No correction applied.
ovrAudioHeadphones_Rift
Apply correction for default headphones on Rift.
ovrAudioHeadphones_Rift_INTERNAL0
Apply correction for default headphones on Rift.
ovrAudioHeadphones_Rift_INTERNAL1
Apply correction for default headphones on Rift.
ovrAudioHeadphones_Rift_INTERNAL2
Apply correction for default headphones on Rift.
ovrAudioHeadphones_Rift_INTERNAL3
Apply correction for default headphones on Rift.
ovrAudioHeadphones_Rift_INTERNAL4
Apply correction for default headphones on Rift.
ovrAudioHeadphones_Custom
Apply correction using custom IR.
ovrAudioHeadphones_COUNT
enum OVR_Audio.h.ovrAudioPerformanceCounter
Performance counter enumerants.
Enumerator
ovrAudioPerformanceCounter_Spatialization
Retrieve profiling information for spatialization.
ovrAudioPerformanceCounter_SharedReverb
Retrieve profiling information for shared reverb.
ovrAudioPerformanceCounter_HeadphoneCorrection
Retrieve profiling information for headphone correction.
ovrAudioPerformanceCounter_COUNT
enum OVR_Audio.h.ovrAudioAmbisonicFormat
Ambisonic formats.
Enumerator
ovrAudioAmbisonicFormat_FuMa
standard B-Format, channel order = WXYZ (W channel is -3dB)
ovrAudioAmbisonicFormat_AmbiX
ACN/SN3D standard, channel order = WYZX.
enum OVR_Audio.h.ovrAudioAmbisonicSpeakerLayout
Virtual speaker layouts for ambisonics.
Enumerator
ovrAudioAmbisonicSpeakerLayout_FrontOnly= 0
ovrAudioAmbisonicSpeakerLayout_Octahedron= 1
ovrAudioAmbisonicSpeakerLayout_Cube= 2
ovrAudioAmbisonicSpeakerLayout_Icosahedron= 3
ovrAudioAmbisonicSpeakerLayout_Dodecahedron= 4
ovrAudioAmbisonicSpeakerLayout_20PointElectron= 5
ovrAudioAmbisonicSpeakerLayout_SphericalHarmonics= -1
ovrAudioAmbisonicSpeakerLayout_Mono= -2

Typedef Documentation

typedef int32_t ovrResult ( )
typedef struct ovrPosef_ ovrPosef ( )
typedef struct ovrPoseStatef_ ovrPoseStatef ( )
typedef struct ovrAudioSource_ ovrAudioSource ( )
Opaque type definitions for audio source and context.
typedef struct ovrAudioContext_* ovrAudioContext ( )
typedef struct ovrAudioAmbisonicStream_* ovrAudioAmbisonicStream ( )
typedef void* ovrAudioSpectrumAnalyzer ( )
ovrAudioPrivateAPI ( )
Opaque type used for access to private/hidden functions.

Function Documentation

ovrResult ovrAudio_Initialize ( void )
DEPRECATED Initialize OVRAudio.
void ovrAudio_Shutdown ( void )
DEPRECATED Shutdown OVRAudio.
OVRA_EXPORT const char* ovrAudio_GetVersion ( int * Major, int * Minor, int * Patch )
Return library's built version information.
Can be called any time. Major pointer to integer that accepts major version number Minor pointer to integer that accepts minor version number Patch pointer to integer that accepts patch version number Returns a string with human readable build information
OVRA_EXPORT float* ovrAudio_AllocSamples ( int NumSamples )
Allocate properly aligned buffer to store samples.
Helper function that allocates 16-byte aligned sample data sufficient for passing to the spatialization APIs. NumSamples number of samples to allocate Returns pointer to 16-byte aligned float buffer, or NULL on failure ovrAudio_FreeSamples
OVRA_EXPORT void ovrAudio_FreeSamples ( float * Samples )
Free previously allocated buffer.
Helper function that frees 16-byte aligned sample data previously allocated by ovrAudio_AllocSamples. Samples pointer to buffer previously allocated by ovrAudio_AllocSamples ovrAudio_AllocSamples
OVRA_EXPORT ovrResult ovrAudio_GetTransformFromPose ( const ovrPosef * Pose, float * Vx, float * Vy, float * Vz, float * Pos )
Retrieve a transformation from an ovrPosef.
Pose[in] pose to fetch transform from Vx[out] buffer to store orientation vector X Vy[out] buffer to store orientation vector Y Vz[out] buffer to store orientation vector Z Pos[out] buffer to store position Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_CreateContext ( ovrAudioContext * pContext, const ovrAudioContextConfiguration * pConfig )
Create an audio context for spatializing incoming sounds.
Creates an audio context with the given configuration. pContext[out] pointer to store address of context. NOTE: pointer must be pointing to NULL! pConfig[in] pointer to configuration struct describing the desired context attributes Returns an ovrResult indicating success or failure ovrAudio_DestroyContext ovrAudioContextConfiguration
OVRA_EXPORT void ovrAudio_DestroyContext ( ovrAudioContext Context )
Destroy a previously created audio context.
Context a valid audio context ovrAudio_CreateContext
OVRA_EXPORT ovrResult ovrAudio_Enable ( ovrAudioContext Context, ovrAudioEnable What, int Enable )
Enable/disable options in the audio context.
Context context to use What specific property to enable/disable Enable 0 to disable, 1 to enable Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_IsEnabled ( ovrAudioContext Context, ovrAudioEnable What, int * pEnabled )
Query option status in the audio context.
Context context to use What specific property to query pEnabled addr of variable to receive the queried property status Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_SetHRTFInterpolationMethod ( ovrAudioContext Context, ovrAudioHRTFInterpolationMethod InterpolationMethod )
Set HRTF interpolation method.
NOTE: Internal use only! Context context to use InterpolationMethod method to use
OVRA_EXPORT ovrResult ovrAudio_GetHRTFInterpolationMethod ( ovrAudioContext Context, ovrAudioHRTFInterpolationMethod * pInterpolationMethod )
Get HRTF interpolation method.
NOTE: Internal use only! Context context to use InterpolationMethod method to use
OVRA_EXPORT ovrResult ovrAudio_SetSimpleBoxRoomParameters ( ovrAudioContext Context, const ovrAudioBoxRoomParameters * Parameters )
Set box room parameters for reverberation.
These parameters are used for reverberation/early reflections if ovrAudioEnable_SimpleRoomModeling is enabled.Width/Height/Depth default is 11/10/9m Reflection constants default to 0.25 Context[in] context to use Parameters[in] pointer to ovrAudioBoxRoomParameters describing box Returns an ovrResult indicating success or failure ovrAudioBoxRoomParameters ovrAudio_Enable
OVRA_EXPORT ovrResult ovrAudio_GetSimpleBoxRoomParameters ( ovrAudioContext Context, ovrAudioBoxRoomParameters * Parameters )
Get box room parameters for current reverberation.
Context[in] context to use Parameters[in] pointer to returned ovrAudioBoxRoomParameters box description Returns an ovrResult indicating success or failure ovrAudioBoxRoomParameters ovrAudio_Enable
OVRA_EXPORT ovrResult ovrAudio_SetListenerVectors ( ovrAudioContext Context, float PositionX, float PositionY, float PositionZ, float ForwardX, float ForwardY, float ForwardZ, float UpX, float UpY, float UpZ )
Sets the listener's pose state as vectors.
If this is not set then the listener is always assumed to be facing into the screen (0,0,-1) at location (0,0,0) and that all spatialized sounds are in listener-relative coordinates. Context[in] context to use PositionX[in] X position of listener on X axis PositionY[in] Y position of listener on X axis PositionZ[in] Z position of listener on X axis ForwardX[in] X component of listener forward vector ForwardY[in] Y component of listener forward vector ForwardZ[in] Z component of listener forward vector UpX[in] X component of listener up vector UpY[in] Y component of listener up vector UpZ[in] Z component of listener up vector Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_GetListenerVectors ( ovrAudioContext Context, float * pPositionX, float * pPositionY, float * pPositionZ, float * pForwardX, float * pForwardY, float * pForwardZ, float * pUpX, float * pUpY, float * pUpZ )
Gets the listener's pose state as vectors.
Context[in] context to use pPositionX[in] addr of X position of listener on X axis pPositionY[in] addr of Y position of listener on X axis pPositionZ[in] addr of Z position of listener on X axis pForwardX[in] addr of X component of listener forward vector pForwardY[in] addr of Y component of listener forward vector pForwardZ[in] addr of Z component of listener forward vector pUpX[in] addr of X component of listener up vector pUpY[in] addr of Y component of listener up vector pUpZ[in] addr of Z component of listener up vector Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_SetListenerPoseStatef ( ovrAudioContext Context, const ovrPoseStatef * PoseState )
Sets the listener's pose state.
If this is not set then the listener is always assumed to be facing into the screen (0,0,-1) at location (0,0,0) and that all spatialized sounds are in listener-relative coordinates. Context[in] context to use PoseState[in] listener's pose state as returned by LibOVR Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_ResetAudioSource ( ovrAudioContext Context, int Sound )
Reset an audio source's state.
Sometimes you need to reset an audio source's internal state due to a change in the incoming sound or parameters. For example, removing any reverb tail since the incoming waveform has been swapped. Context context to use Sound index of sound (0..NumSources-1) Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_SetAudioSourcePos ( ovrAudioContext Context, int Sound, float X, float Y, float Z )
Sets the position of an audio source.
Use "OVR" coordinate system (same as pose). Context context to use Sound index of sound (0..NumSources-1) X position of sound on X axis Y position of sound on Y axis Z position of sound on Z axis Returns an ovrResult indicating success or failure ovrAudio_SetListenerPoseStatef ovrAudio_SetAudioSourceRange
OVRA_EXPORT ovrResult ovrAudio_GetAudioSourcePos ( ovrAudioContext Context, int Sound, float * pX, float * pY, float * pZ )
Gets the position of an audio source.
Use "OVR" coordinate system (same as pose). Context context to use Sound index of sound (0..NumSources-1) pX address of position of sound on X axis pY address of position of sound on Y axis pZ address of position of sound on Z axis Returns an ovrResult indicating success or failure ovrAudio_SetListenerPoseStatef ovrAudio_SetAudioSourceRange
OVRA_EXPORT ovrResult ovrAudio_SetAudioSourceRange ( ovrAudioContext Context, int Sound, float RangeMin, float RangeMax )
Sets the min and max range of the audio source.
Context context to use Sound index of sound (0..NumSources-1) RangeMin min range in meters (full gain) RangeMax max range in meters Returns an ovrResult indicating success or failure ovrAudio_SetListenerPoseStatef ovrAudio_SetAudioSourcePos
OVRA_EXPORT ovrResult ovrAudio_GetAudioSourceRange ( ovrAudioContext Context, int Sound, float * pRangeMin, float * pRangeMax )
Gets the min and max range of the audio source.
Context context to use Sound index of sound (0..NumSources-1) pRangeMin addr of variable to receive the returned min range parameter (in meters). pRangeMax addr of variable to receive the returned max range parameter (in meters). Returns an ovrResult indicating success or failure ovrAudio_SetListenerPoseStatef ovrAudio_SetAudioSourcePos ovrAudio_SetAudioSourceRange
OVRA_EXPORT ovrResult ovrAudio_SetAudioSourceRadius ( ovrAudioContext Context, int Sound, float Radius )
Sets the radius of the audio source for volumetric sound sources.
Set a radius of 0 to make it a point source. Context context to use Sound index of sound (0..NumSources-1) Radius source radius in meters Returns an ovrResult indicating success or failure ovrAudio_SetListenerPoseStatef ovrAudio_SetAudioSourcePos
OVRA_EXPORT ovrResult ovrAudio_GetAudioSourceRadius ( ovrAudioContext Context, int Sound, float * pRadius )
Gets the radius of the audio source for volumetric sound sources.
Context context to use Sound index of sound (0..NumSources-1) pRadiusMin addr of variable to receive the returned radius parameter (in meters). Returns an ovrResult indicating success or failure ovrAudio_SetListenerPoseStatef ovrAudio_SetAudioSourcePos ovrAudio_SetAudioSourceRadius
OVRA_EXPORT ovrResult ovrAudio_SetAudioSourceFlags ( ovrAudioContext Context, int Sound, uint32_t Flags )
Sets an audio source's flags.
Context context to use Sound index of sound (0..NumSources-1) Flags a logical OR of ovrAudioSourceFlag enumerants Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_GetAudioSourceFlags ( ovrAudioContext Context, int Sound, uint32_t * pFlags )
Gets an audio source's flags.
Context context to use Sound index of sound (0..NumSources-1) pFlags addr of returned flags (a logical OR of ovrAudioSourceFlag enumerants) Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_SetAudioSourceDirectionRESERVED ( ovrAudioContext Context, int Sound, float VX, float VY, float VZ, float Angle )
Sets the direction of an audio source.
Use "OVR" coordinate system (same as pose).This is an experimental feature only. Vn should be a unit vector pointing AWAY from the sound source. Context context to use Sound index of sound (0..NumSources-1) VX X component of direction vector VY Y component of direction vector VZ Z component of direction vector Angle Cone angle of the sound source in degrees. A value of 0 disables directionality. Returns an ovrResult indicating success or failure ovrAudio_SetListenerPoseStatef ovrAudio_SetAudioSourceRange ovrAudio_SetAudioSourcePos
OVRA_EXPORT ovrResult ovrAudio_SetAudioSourceAttenuationMode ( ovrAudioContext Context, int Sound, ovrAudioSourceAttenuationMode Mode, float FixedScale )
Set the attenuation mode for a sound source.
Sounds can have their volume attenuated by distance based on different methods. Context context to use Sound index of sound (0..NumSources-1) Mode attenuation mode to use FixedScale attenuation constant used for fixed attenuation mode Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_GetAudioSourceAttenuationMode ( ovrAudioContext Context, int Sound, ovrAudioSourceAttenuationMode * pMode, float * pFixedScale )
Get the attenuation mode for a sound source.
Sounds can have their volume attenuated by distance based on different methods. Context context to use Sound index of sound (0..NumSources-1) pMode addr of returned attenuation mode in use pFixedScale addr of returned attenuation constant used for fixed attenuation mode Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_SpatializeMonoSourceInterleaved ( ovrAudioContext Context, int Sound, uint32_t * OutStatus, float * Dst, const float * Src )
Spatialize a mono audio source to interleaved stereo output.
Context[in] context to use Sound[in] index of sound (0..NumSources-1) InFlags[in] spatialization flags to apply OutStatus[out] bitwise OR of flags indicating status of currently playing sound Dst[out] pointer to stereo interleaved floating point destination buffer Src[in] pointer to mono floating point buffer to spatialize Returns an ovrResult indicating success or failure ovrAudio_SpatializeMonoSourceLR
OVRA_EXPORT ovrResult ovrAudio_SpatializeMonoSourceLR ( ovrAudioContext Context, int Sound, uint32_t * OutStatus, float * DstLeft, float * DstRight, const float * Src )
Spatialize a mono audio source to separate left and right output buffers.
Context[in] context to use Sound[in] index of sound (0..NumSources-1) InFlags[in] spatialization flags to apply OutStatus[out] bitwise OR of flags indicating status of currently playing sound DstLeft[out] pointer to floating point left channel buffer DstRight[out] pointer to floating point right channel buffer Src[in] pointer to mono floating point buffer to spatialize Returns an ovrResult indicating success or failure ovrAudio_SpatializeMonoSourceInterleaved
OVRA_EXPORT ovrResult ovrAudio_SetHeadphoneModel ( ovrAudioContext Context, ovrAudioHeadphones Model, const float * ImpulseResponse, int NumSamples )
Set the headphone model used by the headphone correction algorithm.
Context[in] context to use Model[in] model to use ImpulseResponse[in] impulse response to use NumSamples[in] size of impulse response in samples Returns an ovrResult indicating success or failure ovrAudio_ApplyHeadphoneCorrection
OVRA_EXPORT ovrResult ovrAudio_GetHeadphoneModel ( ovrAudioContext Context, ovrAudioHeadphones * pModel, const float ** pImpulseResponse, int * pNumSamples )
Get the headphone model used by the headphone correction algorithm.
Context[in] context to use pModel[in] addr of returned model used pImpulseResponse[in] addr of returned impulse response used (as a readonly buffer) pNumSamples[in] addr of returned size of impulse response in samples Returns an ovrResult indicating success or failure ovrAudio_ApplyHeadphoneCorrection
OVRA_EXPORT ovrResult ovrAudio_ApplyHeadphoneCorrection ( ovrAudioContext Context, float * OutLeft, float * OutRight, const float * InLeft, const float * InRight, int NumSamples )
Apply headphone correction algorithm to stereo buffer.
NOTE: Currently unimplemented Context[in] context to use OutLeft[out] pointer to floating point left channel buffer destination OutRight[out] pointer to floating point right channel buffer destination InLeft[in] pointer to floating point left channel buffer source InRight[in] pointer to floating point right channel buffer source NumSamples size of buffers (in samples) Returns an ovrResult indicating success or failure ovrAudio_SetHeadphoneModel
OVRA_EXPORT ovrResult ovrAudio_MixInSharedReverbLR ( ovrAudioContext Context, uint32_t * OutStatus, float * DstLeft, float * DstRight )
Mix shared reverb into buffer.
Context[in] context to use InFlags[in] spatialization flags to apply OutStatus[out] bitwise OR of flags indicating status of currently playing sound OutLeft[out] pointer to floating point left channel buffer to mix into (MUST CONTAIN VALID AUDIO OR SILENCE) OutRight[out] pointer to floating point right channel buffer to mix into (MUST CONTAIN VALID AUDIO OR SILENCE) Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_MixInSharedReverbInterleaved ( ovrAudioContext Context, uint32_t * OutStatus, float * DstInterleaved )
Mix shared reverb into interleaved buffer.
Context[in] context to use InFlags[in] spatialization flags to apply OutStatus[out] bitwise OR of flags indicating status of currently playing sound DstInterleaved pointer to interleaved floating point left&right channels buffer to mix into (MUST CONTAIN VALID AUDIO OR SILENCE) Returns an ovrResult indicating success or failure
OVRA_EXPORT ovrResult ovrAudio_SetSharedReverbRange ( ovrAudioContext Context, float RangeMin, float RangeMax )
Sets the min and max range of the shared reverb.
Context context to use RangeMin min range in meters (full gain) RangeMax max range in meters Returns an ovrResult indicating success or failure ovrAudio_SetListenerPoseStatef ovrAudio_MixInSharedReverbLR
OVRA_EXPORT ovrResult ovrAudio_GetSharedReverbRange ( ovrAudioContext Context, float * pRangeMin, float * pRangeMax )
Gets the min and max range of the shared reverb.
Context context to use pRangeMin addr of the returned min range in meters (full gain) pRangeMax addr of the returned max range in meters Returns an ovrResult indicating success or failure ovrAudio_SetSharedReverbRange ovrAudio_SetListenerPoseStatef ovrAudio_MixInSharedReverbLR
OVRA_EXPORT ovrResult ovrAudio_SetHeadRadius ( ovrAudioContext Context, float HeadRadius )
Set user headRadius.
NOTE: This API is intended to let you set user configuration parameters that may assist with spatialization. Context[in] context to use Config[in] configuration state
OVRA_EXPORT ovrResult ovrAudio_GetHeadRadius ( ovrAudioContext Context, float * HeadRadius )
Set user configuration.
NOTE: This API is intended to let you set user configuration parameters that may assist with spatialization. Context[in] context to use Config[in] configuration state
OVRA_EXPORT ovrResult ovrAudio_GetPrivateAPI ( ovrAudioContext Context, ovrAudioPrivateAPI * Dst )
OVRA_EXPORT ovrResult ovrAudio_GetPerformanceCounter ( ovrAudioContext Context, ovrAudioPerformanceCounter Counter, int64_t * Count, double * TimeMicroSeconds )
Retrieve a performance counter.
Context[in] context to use Counter[in] the counter to retrieve Count[out] destination for count variable (number of times that counter was updated) TimeMicroSeconds destination for total time spent in that performance counter Returns an ovrResult indicating success or failure ovrAudio_ResetPerformanceCounter
OVRA_EXPORT ovrResult ovrAudio_ResetPerformanceCounter ( ovrAudioContext Context, ovrAudioPerformanceCounter Counter )
Reset a performance counter.
Context[in] context to use Counter[in] the counter to retrieve ovrAudio_ResetPerformanceCounter
OVRA_EXPORT ovrResult ovrAudio_ProcessQuadBinaural ( const float * ForwardLR, const float * RightLR, const float * BackLR, const float * LeftLR, float LookDirectionX, float LookDirectionY, float LookDirectionZ, int NumSamples, float * Dst )
Quad-binaural spatialization.
ForwardLR[in] pointer to stereo interleaved floating point binaural audio for the forward direction (0 degrees) RightLR[in] pointer to stereo interleaved floating point binaural audio for the right direction (90 degrees) BackLR[in] pointer to stereo interleaved floating point binaural audio for the backward direction (180 degrees) LeftLR[in] pointer to stereo interleaved floating point binaural audio for the left direction (270 degrees) LookDirectionX[in] X component of the listener direction vector LookDirectionY[in] Y component of the listener direction vector LookDirectionZ[in] Z component of the listener direction vector NumSamples[in] size of audio buffers (in samples) Dst[out] pointer to stereo interleaved floating point destination buffer
OVRA_EXPORT ovrResult ovrAudio_CreateAmbisonicStream ( ovrAudioContext Context, int SampleRate, int AudioBufferLength, ovrAudioAmbisonicFormat format, int ambisonicOrder, ovrAudioAmbisonicStream * pAmbisonicStream )
Create an ambisonic stream instance for spatializing B-format ambisonic audio.
SampleRate[in] sample rate of B-format signal (16000 to 48000, but 44100 and 48000 are recommended for best quality) AudioBufferLength[in] size of audio buffers pContext[out] pointer to store address of stream.
OVRA_EXPORT ovrResult ovrAudio_ResetAmbisonicStream ( ovrAudioAmbisonicStream AmbisonicStream )
Reset a previously created ambisonic stream for re-use.
Context a valid ambisonic stream
OVRA_EXPORT ovrResult ovrAudio_DestroyAmbisonicStream ( ovrAudioAmbisonicStream AmbisonicStream )
Destroy a previously created ambisonic stream.
Context a valid ambisonic stream ovrAudio_CreateAmbisonicStream
OVRA_EXPORT ovrResult ovrAudio_SetAmbisonicSpeakerLayout ( ovrAudioAmbisonicStream AmbisonicStream, ovrAudioAmbisonicSpeakerLayout Layout )
Sets the virtual speaker layout for the ambisonic stream.
Context a valid ambisonic stream ovrAudioAmbisonicSpeakerLayout
OVRA_EXPORT ovrResult ovrAudio_GetAmbisonicSpeakerLayout ( ovrAudioAmbisonicStream AmbisonicStream, ovrAudioAmbisonicSpeakerLayout * Layout )
Sets the virtual speaker layout for the ambisonic stream.
Context a valid ambisonic stream ovrAudioAmbisonicSpeakerLayout
OVRA_EXPORT ovrResult ovrAudio_MonoToAmbisonic ( const float * InMono, float DirectionX, float DirectionY, float DirectionZ, ovrAudioAmbisonicFormat Format, int AmbisonicOrder, float * OutAmbisonic, int NumSamples )
Spatialize a mono in ambisonics.
InMono[in] Mono audio buffer to spatialize DirectionX[in] X component of the direction vector DirectionY[in] Y component of the direction vector DirectionZ[in] Z component of the direction vector Format[in] ambisonic format (AmbiX or FuMa) AmbisonicOrder[in] order of ambisonics (1 or 2) OutAmbisonic[out] Buffer to write interleaved ambisonics to (4 channels for 1st order, 9 channels for second order) NumSamples[in] Length of the buffer in frames (InMono is this length, OutAmbisonic is either 4 or 9 times this length depending on 1st or 2nd order)
OVRA_EXPORT ovrResult ovrAudio_RenderAmbisonicSpeakerFeed ( const float * InAmbisonics, float DirectionX, float DirectionY, float DirectionZ, ovrAudioAmbisonicFormat Format, int AmbisonicOrder, float * SpeakerFeed, int NumSamples )
Render a speaker feed from ambisonics.
InAmbisonics[in] Interleaved ambisonic audio buffer to render (4 channels for 1st order, 9 channels for second order) DirectionX[in] X component of the direction vector DirectionY[in] Y component of the direction vector DirectionZ[in] Z component of the direction vector Format[in] ambisonic format (AmbiX or FuMa) AmbisonicOrder[in] order of ambisonics (1 or 2) OutSpeakerFeed[out] Buffer to write speaker feed to NumSamples[in] Length of the buffer in frames (OutSpeakerFeed is this length, InAmbisonics is either 4 or 9 times this length depending on 1st or 2nd order)
OVRA_EXPORT ovrResult ovrAudio_ProcessAmbisonicStreamInterleaved ( ovrAudioContext Context, ovrAudioAmbisonicStream AmbisonicStream, const float * Src, float * Dst, int NumSamples )
Spatialize ambisonic stream.
Src[in] pointer to 4 channel interleaved B-format floating point buffer to spatialize Dst[out] pointer to stereo interleaved floating point destination buffer
OVRA_EXPORT ovrResult ovrAudio_SetAmbisonicOrientation ( ovrAudioAmbisonicStream AmbisonicStream, float LookDirectionX, float LookDirectionY, float LookDirectionZ, float UpDirectionX, float UpDirectionY, float UpDirectionZ )
Set orientation for ambisonic stream.
LookDirectionX[in] X component of the source direction vector LookDirectionY[in] Y component of the source direction vector LookDirectionZ[in] Z component of the source direction vector UpDirectionX[in] X component of the source up vector UpDirectionY[in] Y component of the source up vector UpDirectionZ[in] Z component of the source up vector
OVRA_EXPORT ovrResult ovrAudio_GetAmbisonicOrientation ( ovrAudioAmbisonicStream AmbisonicStream, float * pLookDirectionX, float * pLookDirectionY, float * pLookDirectionZ, float * pUpDirectionX, float * pUpDirectionY, float * pUpDirectionZ )
Get orientation for ambisonic stream.
pLookDirectionX[in] address of the X component of the source direction vector pLookDirectionY[in] address of the Y component of the source direction vector pLookDirectionZ[in] address of the Z component of the source direction vector pUpDirectionX[in] address of the X component of the source up vector pUpDirectionY[in] address of the Y component of the source up vector pUpDirectionZ[in] address of the Z component of the source up vector
OVRA_EXPORT ovrResult ovrAudio_SetProfilerEnabled ( ovrAudioContext Context, int Enabled )
OVRA_EXPORT ovrResult ovrAudio_SetProfilerPort ( ovrAudioContext , int Port )
OVRA_EXPORT ovrResult ovrAudio_CreateSpectrumAnalyzer ( int ChannelCount, int WindowLength, int Overlap, ovrAudioSpectrumAnalyzer * pSpectrumAnalyzer )
OVRA_EXPORT ovrResult ovrAudio_DestroySpectrumAnalyzer ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer )
OVRA_EXPORT ovrResult ovrAudio_ResetSpectrumAnalyzer ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer )
OVRA_EXPORT ovrResult ovrAudio_SpectrumAnalyzerProcessBufferInterleaved ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer, const float * Buffer, int LengthFrames )
OVRA_EXPORT ovrResult ovrAudio_SpectrumAnalyzerGetSpectrumInterleaved ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer, float * Spectrum )
OVRA_EXPORT ovrResult ovrAudio_SpectrumAnalyzerCalculateAmbisonicCoefficients ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer, float DirectionX, float DirectionY, float DirectionZ, float * Coefs )
OVRA_EXPORT ovrResult ovrAudio_SpectrumAnalyzerGetSpectrumAmbisonic ( ovrAudioSpectrumAnalyzer SpectrumAnalyzer, const float * Coefs, float * Spectrum )
OVRA_EXPORT ovrResult ovrAudio_AssignRaycastCallback ( ovrAudioContext Context, OVRA_RAYCAST_CALLBACK Callback, void * pctx )
Assign a callback for raycasting into the game geometry.
Context[in] context to use Callback[in] pointer to an implementation of OVRA_RAYCAST_CALLBACK pctx[in] address of user data pointer to be passed into the callback
OVRA_EXPORT ovrResult ovrAudio_SetDynamicRoomRaysPerSecond ( ovrAudioContext Context, int RaysPerSecond )
Set the number of ray casts per second are used for dynamic modeling, more rays mean more accurate and responsive modelling but will reduce performance.
Context[in] context to use RaysPerSecond[in] number of ray casts per second, default = 256
OVRA_EXPORT ovrResult ovrAudio_SetDynamicRoomInterpSpeed ( ovrAudioContext Context, float InterpSpeed )
Set the speed which the dynamic room interpolates, higher values will update more quickly but less smooth.
Context[in] context to use InterpSpeed[in] speed which it interpolates (0.0 - 1.0) default = 0.9
OVRA_EXPORT ovrResult ovrAudio_SetDynamicRoomMaxWallDistance ( ovrAudioContext Context, float MaxWallDistance )
Set the maximum distance to the wall for dynamic room modeling to constrain the size.
Context[in] context to use MaxWallDistance[in] distance to wall in meters, default = 50
OVRA_EXPORT ovrResult ovrAudio_SetDynamicRoomRaysRayCacheSize ( ovrAudioContext Context, int RayCacheSize )
Set the size of the cache which holds a history of the rays cast, a larger value will have more points making it more stable but less responsive.
Context[in] context to use RayCacheSize[in] number of rays to cache, default = 512
OVRA_EXPORT ovrResult ovrAudio_UpdateRoomModel ( ovrAudioContext Context, float WetLevel )
Update the dynamic room modeling, this will fire the ray cast calback and update the size of the room.
Context[in] context to use
OVRA_EXPORT ovrResult ovrAudio_GetRoomDimensions ( ovrAudioContext Context, float RoomDimensions, float ReflectionsCoefs, ovrAudioVector3f * Position )
Retrieves the dimensions of the dynamic room moel.
Context[in] context to use RoomDimensions[out] X, Y, and Z dimensions of the room ReflectionsCoefs[out] the reflection coefficients of the walls Position[out] the world position of the center of the room
OVRA_EXPORT ovrResult ovrAudio_GetRaycastHits ( ovrAudioContext Context, ovrAudioVector3f Points, ovrAudioVector3f Normals, int Length )
Retrieves the cache of ray cast hits that are being used to estimate the room, this is useful for debugging rays hitting the wrong objects.
Context[in] context to use Points[out] array of points where the rays hit geometry Normals[out] array of normals Length[int] the length of the points and normals array (both should be the same length)
1
6
7
8
9
10
11
12
13
14
15
17
18
19
20
21
23
24
25
26
27
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
97
98
99
100
101
102
103
104
105
106
110
111
112
113
114
115
116
117
118
119
120
124
125
126
127
128
129
130
131
132
133
134
135
136
142
143
144
145
146
147
148
149
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
172
173
174
175
176
177
178
179
180
181
183
184
185
186
187
188
189
194
195
196
197
198
199
200
201
202
203
204
205
206
208
209
210
211
212
214
215
217
218
228
229
239
240
249
250
260
261
262
263
270
271
272
273
274
275
276
277
288
289
290
296
297
305
306
307
308
316
317
318
319
326
327
328
335
336
337
341
342
343
344
345
346
347
348
349
364
365
366
375
376
377
378
397
398
399
400
401
416
417
418
419
420
431
432
433
434
435
436
447
448
460
461
462
463
475
476
477
478
489
490
491
492
504
505
506
507
517
518
519
520
531
532
533
534
542
543
544
545
553
554
555
556
573
574
575
576
577
588
589
590
591
592
603
604
605
606
607
620
621
622
623
624
638
639
640
641
642
643
653
654
655
656
666
667
668
669
683
684
685
686
687
697
698
699
700
701
710
711
712
713
714
724
725
726
737
738
739
747
748
749
757
758
759
763
764
765
766
776
777
778
779
780
787
788
789
802
803
804
805
812
813
814
815
816
817
818
823
824
830
831
837
838
844
845
857
858
870
871
877
878
888
889
890
891
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
923
924
930
931
932
938
939
940
946
947
953
954
959
960
968
969
977
978
979
980
981
982
983
1314
/********************************************************************************/
#ifndef OVR_Audio_h
#define OVR_Audio_h

#include "OVR_Audio_DynamicRoom.h"
#include <stdint.h>

#ifdef __cplusplus
extern"C" {
#endif

#ifndef OVR_RESULT_DEFINED
#define OVR_RESULT_DEFINED
typedef int32_t ovrResult;
#endif

#ifndef OVR_SUCCESS_DEFINED
#define OVR_SUCCESS_DEFINED
#define ovrSuccess 0
#endif

typedefenum
{
   ovrError_AudioUnknown                                = 2000, 
   ovrError_AudioInvalidParam                           = 2001, 
   ovrError_AudioBadSampleRate                          = 2002, 
   ovrError_AudioMissingDLL                             = 2003, 
   ovrError_AudioBadAlignment                           = 2004, 
   ovrError_AudioUninitialized                          = 2005, 
   ovrError_AudioHRTFInitFailure                        = 2006, 
   ovrError_AudioBadVersion                             = 2007, 
   ovrError_AudioSymbolNotFound                         = 2008, 
   ovrError_SharedReverbDisabled                        = 2009, 
   ovrError_AudioNoAvailableAmbisonicInstance           = 2017,
   ovrError_AudioInternalEnd                            = 2099, 
} ovrAudioError;

#ifndef OVR_CAPI_h
typedefstruct ovrPosef_ ovrPosef;
typedefstruct ovrPoseStatef_ ovrPoseStatef;
#endif

#define OVR_AUDIO_MAJOR_VERSION 1
#define OVR_AUDIO_MINOR_VERSION 18
#define OVR_AUDIO_PATCH_VERSION 0

#ifdef _WIN32
#ifdef OVR_AUDIO_DLL
#define OVRA_EXPORT __declspec( dllexport )
#else
#define OVRA_EXPORT 
#endif
#define FUNC_NAME __FUNCTION__
#elif defined(__ANDROID__)
#define OVRA_EXPORT __attribute__((visibility("default")))
#define FUNC_NAME __func__
#elif defined __APPLE__ 
#define OVRA_EXPORT 
#define FUNC_NAME __func__
#elif defined __linux__
#define OVRA_EXPORT __attribute__((visibility("default")))
#define FUNC_NAME __func__
#else
#error not implemented
#endif

typedefenum
{
  ovrAudioSourceFlag_None                          = 0x0000,

  ovrAudioSourceFlag_WideBand_HINT                 = 0x0010, 
  ovrAudioSourceFlag_NarrowBand_HINT               = 0x0020, 
  ovrAudioSourceFlag_BassCompensation_DEPRECATED   = 0x0040, 
  ovrAudioSourceFlag_DirectTimeOfArrival           = 0x0080, 

  ovrAudioSourceFlag_ReflectionsDisabled           = 0x0100, 

  ovrAudioSourceFlag_DisableResampling_RESERVED    = 0x8000, 

} ovrAudioSourceFlag;

typedefenum
{
  ovrAudioSourceAttenuationMode_None          = 0,      
  ovrAudioSourceAttenuationMode_Fixed         = 1,      
  ovrAudioSourceAttenuationMode_InverseSquare = 2,      

  ovrAudioSourceAttenuationMode_COUNT

} ovrAudioSourceAttenuationMode;

typedefenum
{
    ovrAudioEnable_None                     = 0,   
    ovrAudioEnable_SimpleRoomModeling       = 2,   
    ovrAudioEnable_LateReverberation        = 3,   
    ovrAudioEnable_RandomizeReverb          = 4,   
    ovrAudioEnable_PerSourceReverb          = 5,   

    ovrAudioEnable_COUNT
} ovrAudioEnable;

typedefenum
{

  ovrAudioHRTFInterpolationMethod_Nearest,
  ovrAudioHRTFInterpolationMethod_SimpleTimeDomain,
  ovrAudioHRTFInterpolationMethod_MinPhaseTimeDomain,
  ovrAudioHRTFInterpolationMethod_PhaseTruncation,
  ovrAudioHRTFInterpolationMethod_PhaseLerp,

  ovrAudioHRTFInterpolationMethod_COUNT

} ovrAudioHRTFInterpolationMethod;

typedefenum
{
  ovrAudioSpatializationStatus_None      = 0x00,  
  ovrAudioSpatializationStatus_Finished  = 0x01,  
  ovrAudioSpatializationStatus_Working   = 0x02,  

} ovrAudioSpatializationStatus;

typedefenum
{
    ovrAudioHeadphones_None           = -1,  
    ovrAudioHeadphones_Rift           = 0,   
    ovrAudioHeadphones_Rift_INTERNAL0 = 1,   
    ovrAudioHeadphones_Rift_INTERNAL1 = 2,   
    ovrAudioHeadphones_Rift_INTERNAL2 = 3,   
    ovrAudioHeadphones_Rift_INTERNAL3 = 4,   
    ovrAudioHeadphones_Rift_INTERNAL4 = 5,   

    ovrAudioHeadphones_Custom         = 10,  

    ovrAudioHeadphones_COUNT
} ovrAudioHeadphones;

typedefenum
{
    ovrAudioPerformanceCounter_Spatialization            = 0,  
    ovrAudioPerformanceCounter_SharedReverb              = 1,  
    ovrAudioPerformanceCounter_HeadphoneCorrection       = 2,  

    ovrAudioPerformanceCounter_COUNT
} ovrAudioPerformanceCounter;


typedefenum
{
    ovrAudioAmbisonicFormat_FuMa, 
    ovrAudioAmbisonicFormat_AmbiX 
} ovrAudioAmbisonicFormat;


typedefenum
{
    ovrAudioAmbisonicSpeakerLayout_FrontOnly           =  0, // A single virtual speaker in-front of listener
    ovrAudioAmbisonicSpeakerLayout_Octahedron          =  1, // 6 virtual speakers
    ovrAudioAmbisonicSpeakerLayout_Cube                =  2, // 8 virtual speakers
    ovrAudioAmbisonicSpeakerLayout_Icosahedron         =  3, // 12 virtual speakers
    ovrAudioAmbisonicSpeakerLayout_Dodecahedron        =  4, // 20 virtual speakers
    ovrAudioAmbisonicSpeakerLayout_20PointElectron     =  5, // 20 virtual speakers more evenly distributed over sphere
    ovrAudioAmbisonicSpeakerLayout_SphericalHarmonics  = -1, // (default) Uses a spherical harmonic representation of HRTF instead of virtual speakers
    ovrAudioAmbisonicSpeakerLayout_Mono                = -2  // Plays the W (omni) channel through left and right with no spatialization
} ovrAudioAmbisonicSpeakerLayout;


typedefstruct ovrAudioSource_   ovrAudioSource;
typedefstruct ovrAudioContext_ *ovrAudioContext;
typedefstruct ovrAudioAmbisonicStream_ *ovrAudioAmbisonicStream;
typedefvoid *ovrAudioSpectrumAnalyzer;

inline ovrResult ovrAudio_Initialize(void) { return ovrSuccess; }

inlinevoid ovrAudio_Shutdown(void) {}

OVRA_EXPORT constchar *ovrAudio_GetVersion( int *Major, int *Minor, int *Patch );

OVRA_EXPORT float * ovrAudio_AllocSamples( int NumSamples );

OVRA_EXPORT void ovrAudio_FreeSamples( float *Samples );

OVRA_EXPORT ovrResult ovrAudio_GetTransformFromPose( const ovrPosef *Pose, 
float *Vx, float *Vy, float *Vz,
float *Pos );

typedefstruct _ovrAudioContextConfig
{
  uint32_t   acc_Size;              
  uint32_t   acc_MaxNumSources;     
  uint32_t   acc_SampleRate;        
  uint32_t   acc_BufferLength;      
} ovrAudioContextConfiguration;

OVRA_EXPORT ovrResult ovrAudio_CreateContext( ovrAudioContext *pContext,
const ovrAudioContextConfiguration *pConfig );

OVRA_EXPORT void ovrAudio_DestroyContext( ovrAudioContext Context );

OVRA_EXPORT ovrResult ovrAudio_Enable( ovrAudioContext Context, 
                                  ovrAudioEnable What, 
int Enable );

OVRA_EXPORT ovrResult ovrAudio_IsEnabled( ovrAudioContext Context, 
                                          ovrAudioEnable What, 
int* pEnabled );

OVRA_EXPORT ovrResult ovrAudio_SetHRTFInterpolationMethod( ovrAudioContext Context, 
                                                             ovrAudioHRTFInterpolationMethod InterpolationMethod );

OVRA_EXPORT ovrResult ovrAudio_GetHRTFInterpolationMethod( ovrAudioContext Context, 
                                                            ovrAudioHRTFInterpolationMethod* pInterpolationMethod );

typedefstruct _ovrAudioBoxRoomParameters
{
   uint32_t       brp_Size;                              
float          brp_ReflectLeft, brp_ReflectRight;     
float          brp_ReflectUp, brp_ReflectDown;        
float          brp_ReflectBehind, brp_ReflectFront;   
float          brp_Width, brp_Height, brp_Depth;      
} ovrAudioBoxRoomParameters;

OVRA_EXPORT ovrResult ovrAudio_SetSimpleBoxRoomParameters( ovrAudioContext Context, 
const ovrAudioBoxRoomParameters *Parameters );

OVRA_EXPORT ovrResult ovrAudio_GetSimpleBoxRoomParameters( ovrAudioContext Context, 
                                                            ovrAudioBoxRoomParameters *Parameters );


OVRA_EXPORT ovrResult ovrAudio_SetListenerVectors(  ovrAudioContext Context,
float PositionX, float PositionY, float PositionZ,
float ForwardX, float ForwardY, float ForwardZ,
float UpX, float UpY, float UpZ );

OVRA_EXPORT ovrResult ovrAudio_GetListenerVectors(  ovrAudioContext Context,
float* pPositionX, float* pPositionY, float* pPositionZ,
float* pForwardX, float* pForwardY, float* pForwardZ,
float* pUpX, float* pUpY, float* pUpZ );

OVRA_EXPORT ovrResult ovrAudio_SetListenerPoseStatef( ovrAudioContext Context, 
const ovrPoseStatef *PoseState );

// Note: there is no ovrAudio_GetListenerPoseStatef() since the pose data is not cached internally.
// Use ovrAudio_GetListenerVectors() instead to get the listener's position and orientation info.

OVRA_EXPORT ovrResult ovrAudio_ResetAudioSource( ovrAudioContext Context, int Sound );

OVRA_EXPORT ovrResult ovrAudio_SetAudioSourcePos( ovrAudioContext Context, 
int Sound, 
float X, float Y, float Z );

OVRA_EXPORT ovrResult ovrAudio_GetAudioSourcePos( ovrAudioContext Context, 
int Sound, 
float* pX, float* pY, float* pZ );

OVRA_EXPORT ovrResult ovrAudio_SetAudioSourceRange( ovrAudioContext Context, 
int Sound, 
float RangeMin, float RangeMax );

OVRA_EXPORT ovrResult ovrAudio_GetAudioSourceRange( ovrAudioContext Context, 
int Sound, 
float* pRangeMin, float* pRangeMax );

OVRA_EXPORT ovrResult ovrAudio_SetAudioSourceRadius( ovrAudioContext Context, 
int Sound, 
float Radius );

OVRA_EXPORT ovrResult ovrAudio_GetAudioSourceRadius( ovrAudioContext Context, 
int Sound, 
float* pRadius );

OVRA_EXPORT ovrResult ovrAudio_SetAudioSourceFlags( ovrAudioContext Context, 
int Sound, 
                                                    uint32_t Flags );

OVRA_EXPORT ovrResult ovrAudio_GetAudioSourceFlags( ovrAudioContext Context, 
int Sound, 
                                                    uint32_t* pFlags );

OVRA_EXPORT ovrResult ovrAudio_SetAudioSourceDirectionRESERVED( ovrAudioContext Context, 
int Sound, 
float VX, float VY, float VZ, 
float Angle );

OVRA_EXPORT ovrResult ovrAudio_SetAudioSourceAttenuationMode( ovrAudioContext Context, 
int Sound, 
                                                              ovrAudioSourceAttenuationMode Mode, 
float FixedScale );

OVRA_EXPORT ovrResult ovrAudio_GetAudioSourceAttenuationMode( ovrAudioContext Context, 
int Sound, 
                                                              ovrAudioSourceAttenuationMode* pMode, 
float* pFixedScale );

OVRA_EXPORT ovrResult ovrAudio_SpatializeMonoSourceInterleaved( ovrAudioContext Context, 
int Sound, 
                                                          uint32_t *OutStatus, 
float *Dst, constfloat *Src );

OVRA_EXPORT ovrResult ovrAudio_SpatializeMonoSourceLR( ovrAudioContext Context, 
int Sound, 
                                                 uint32_t *OutStatus, 
float *DstLeft, float *DstRight, 
constfloat *Src );

OVRA_EXPORT ovrResult ovrAudio_SetHeadphoneModel( ovrAudioContext Context, 
                                            ovrAudioHeadphones Model,
constfloat *ImpulseResponse, int NumSamples );

OVRA_EXPORT ovrResult ovrAudio_GetHeadphoneModel( ovrAudioContext Context, 
                                            ovrAudioHeadphones* pModel,
constfloat** pImpulseResponse, int* pNumSamples );

OVRA_EXPORT ovrResult ovrAudio_ApplyHeadphoneCorrection( ovrAudioContext Context, 
float *OutLeft, float *OutRight,
constfloat *InLeft, constfloat *InRight,
int NumSamples );

OVRA_EXPORT ovrResult ovrAudio_MixInSharedReverbLR( ovrAudioContext Context, 
                                                    uint32_t *OutStatus, 
float *DstLeft, float *DstRight );


OVRA_EXPORT ovrResult ovrAudio_MixInSharedReverbInterleaved( ovrAudioContext Context,
                                                             uint32_t* OutStatus, 
float* DstInterleaved );


OVRA_EXPORT ovrResult ovrAudio_SetSharedReverbRange( ovrAudioContext Context,
float RangeMin, float RangeMax );

OVRA_EXPORT ovrResult ovrAudio_GetSharedReverbRange( ovrAudioContext Context,
float* pRangeMin, float* pRangeMax );

OVRA_EXPORT ovrResult ovrAudio_SetHeadRadius( ovrAudioContext Context, 
float HeadRadius );

OVRA_EXPORT ovrResult ovrAudio_GetHeadRadius( ovrAudioContext Context,
float *HeadRadius);

typedefstruct _ovrAudioPrivateAPI ovrAudioPrivateAPI;

OVRA_EXPORT ovrResult ovrAudio_GetPrivateAPI( ovrAudioContext Context, ovrAudioPrivateAPI *Dst );

OVRA_EXPORT ovrResult ovrAudio_GetPerformanceCounter( ovrAudioContext Context, 
                                                      ovrAudioPerformanceCounter Counter, 
                                                      int64_t *Count, 
double *TimeMicroSeconds );

OVRA_EXPORT ovrResult ovrAudio_ResetPerformanceCounter( ovrAudioContext Context, 
                                                        ovrAudioPerformanceCounter Counter );

OVRA_EXPORT ovrResult ovrAudio_ProcessQuadBinaural(constfloat *ForwardLR, constfloat *RightLR, constfloat *BackLR, constfloat *LeftLR,
float LookDirectionX, float LookDirectionY, float LookDirectionZ, 
int NumSamples, float *Dst);

OVRA_EXPORT ovrResult ovrAudio_CreateAmbisonicStream(   ovrAudioContext Context,
int SampleRate, 
int AudioBufferLength, 
                                                        ovrAudioAmbisonicFormat format, 
int ambisonicOrder, 
                                                        ovrAudioAmbisonicStream* pAmbisonicStream);

OVRA_EXPORT ovrResult ovrAudio_ResetAmbisonicStream(ovrAudioAmbisonicStream AmbisonicStream);

OVRA_EXPORT ovrResult ovrAudio_DestroyAmbisonicStream(ovrAudioAmbisonicStream AmbisonicStream);

OVRA_EXPORT ovrResult ovrAudio_SetAmbisonicSpeakerLayout(ovrAudioAmbisonicStream AmbisonicStream, ovrAudioAmbisonicSpeakerLayout Layout);

OVRA_EXPORT ovrResult ovrAudio_GetAmbisonicSpeakerLayout(ovrAudioAmbisonicStream AmbisonicStream, ovrAudioAmbisonicSpeakerLayout* Layout);

OVRA_EXPORT ovrResult ovrAudio_MonoToAmbisonic(constfloat* InMono, float DirectionX, float DirectionY, float DirectionZ, ovrAudioAmbisonicFormat Format, int AmbisonicOrder, float* OutAmbisonic, int NumSamples);

OVRA_EXPORT ovrResult ovrAudio_RenderAmbisonicSpeakerFeed(constfloat* InAmbisonics, float DirectionX, float DirectionY, float DirectionZ, ovrAudioAmbisonicFormat Format, int AmbisonicOrder, float* SpeakerFeed, int NumSamples);

OVRA_EXPORT ovrResult ovrAudio_ProcessAmbisonicStreamInterleaved(ovrAudioContext Context, ovrAudioAmbisonicStream AmbisonicStream, constfloat *Src, float *Dst, int NumSamples);

OVRA_EXPORT ovrResult ovrAudio_SetAmbisonicOrientation(ovrAudioAmbisonicStream AmbisonicStream,
float LookDirectionX, float LookDirectionY, float LookDirectionZ,
float UpDirectionX, float UpDirectionY, float UpDirectionZ);

OVRA_EXPORT ovrResult ovrAudio_GetAmbisonicOrientation(ovrAudioAmbisonicStream AmbisonicStream,
float* pLookDirectionX, float* pLookDirectionY, float* pLookDirectionZ,
float* pUpDirectionX, float* pUpDirectionY, float* pUpDirectionZ);


OVRA_EXPORT ovrResult ovrAudio_SetProfilerEnabled(ovrAudioContext Context, int Enabled);
OVRA_EXPORT ovrResult ovrAudio_SetProfilerPort(ovrAudioContext, int Port);

OVRA_EXPORT ovrResult ovrAudio_CreateSpectrumAnalyzer(int ChannelCount, int WindowLength, int Overlap, ovrAudioSpectrumAnalyzer* pSpectrumAnalyzer);
OVRA_EXPORT ovrResult ovrAudio_DestroySpectrumAnalyzer(ovrAudioSpectrumAnalyzer SpectrumAnalyzer);
OVRA_EXPORT ovrResult ovrAudio_ResetSpectrumAnalyzer(ovrAudioSpectrumAnalyzer SpectrumAnalyzer);
OVRA_EXPORT ovrResult ovrAudio_SpectrumAnalyzerProcessBufferInterleaved(ovrAudioSpectrumAnalyzer SpectrumAnalyzer, constfloat* Buffer, int LengthFrames);
OVRA_EXPORT ovrResult ovrAudio_SpectrumAnalyzerGetSpectrumInterleaved(ovrAudioSpectrumAnalyzer SpectrumAnalyzer, float* Spectrum);
OVRA_EXPORT ovrResult ovrAudio_SpectrumAnalyzerCalculateAmbisonicCoefficients(ovrAudioSpectrumAnalyzer SpectrumAnalyzer, float DirectionX, float DirectionY, float DirectionZ, float* Coefs);
OVRA_EXPORT ovrResult ovrAudio_SpectrumAnalyzerGetSpectrumAmbisonic(ovrAudioSpectrumAnalyzer SpectrumAnalyzer, constfloat* Coefs, float* Spectrum);

OVRA_EXPORT ovrResult ovrAudio_AssignRaycastCallback(ovrAudioContext Context, OVRA_RAYCAST_CALLBACK Callback, void* pctx);

OVRA_EXPORT ovrResult ovrAudio_SetDynamicRoomRaysPerSecond(ovrAudioContext Context, int RaysPerSecond);



OVRA_EXPORT ovrResult ovrAudio_SetDynamicRoomInterpSpeed(ovrAudioContext Context, float InterpSpeed);

OVRA_EXPORT ovrResult ovrAudio_SetDynamicRoomMaxWallDistance(ovrAudioContext Context, float MaxWallDistance);

OVRA_EXPORT ovrResult ovrAudio_SetDynamicRoomRaysRayCacheSize(ovrAudioContext Context, int RayCacheSize);

OVRA_EXPORT ovrResult ovrAudio_UpdateRoomModel(ovrAudioContext Context, float WetLevel);

OVRA_EXPORT ovrResult ovrAudio_GetRoomDimensions(ovrAudioContext Context, float RoomDimensions[], float ReflectionsCoefs[], ovrAudioVector3f* Position);

OVRA_EXPORT ovrResult ovrAudio_GetRaycastHits(ovrAudioContext Context, ovrAudioVector3f Points[], ovrAudioVector3f Normals[], int Length);


#ifdef __cplusplus
}
#endif

#endif // OVR_Audio_h
The documentation for this file was generated from the following file: OVR_Audio.h