diff options
author | Chris Robinson <[email protected]> | 2017-04-06 13:00:29 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-06 13:00:29 -0700 |
commit | 338d61f9072bfb811266012c2a9c0a290cf353d1 (patch) | |
tree | 0ef0b218db261569105a782824c5bf50ea3a3067 /Alc/hrtf.h | |
parent | 94f514ae5a0392f5f01f2b479d1d858af688ae24 (diff) |
Reference count HRTFs and unload them when unused
Diffstat (limited to 'Alc/hrtf.h')
-rw-r--r-- | Alc/hrtf.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -6,6 +6,7 @@ #include "alMain.h" #include "alstring.h" +#include "atomic.h" #define HRTFDELAY_BITS (20) @@ -21,6 +22,8 @@ struct HrtfEntry; struct Hrtf { + RefCount ref; + ALuint sampleRate; ALsizei irSize; ALubyte evCount; @@ -37,6 +40,8 @@ void FreeHrtfs(void); vector_EnumeratedHrtf EnumerateHrtf(const_al_string devname); void FreeHrtfList(vector_EnumeratedHrtf *list); struct Hrtf *GetLoadedHrtf(struct HrtfEntry *entry); +void Hrtf_IncRef(struct Hrtf *hrtf); +void Hrtf_DecRef(struct Hrtf *hrtf); void GetHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat spread, ALfloat (*coeffs)[2], ALsizei *delays); |