diff options
author | Chris Robinson <[email protected]> | 2016-11-11 13:14:02 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-11-11 13:14:02 -0800 |
commit | e69af7ab9256507145fdababd092396e85deb651 (patch) | |
tree | f3d383ecf59b1b606e14bea89d509b0a1ebf7453 /Alc/hrtf.c | |
parent | 9ef7719734505d04d093ee85fb39b4777816d6ed (diff) |
Fixes for embedded HRTFs on OSX
Use an empty source file to build a stub object file, instead of /dev/null. Use
_mh_dylib_header to retrieve the data on 10.7+, instead of _mh_execute_header.
And shorten the names to fit in the 16-character limit.
Thanks to Anna Cheremnykh for the fixes!
Diffstat (limited to 'Alc/hrtf.c')
-rw-r--r-- | Alc/hrtf.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -912,22 +912,23 @@ static const ALubyte *GetResource(int name, size_t *size) #include <Availability.h> #include <mach-o/getsect.h> +#include <mach-o/ldsyms.h> static const ALubyte *GetResource(int name, size_t *size) { #if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1070) - /* NOTE: OSX 10.7 and up need to call getsectiondata(&_mh_execute_header, ...). However, that + /* NOTE: OSX 10.7 and up need to call getsectiondata(&_mh_dylib_header, ...). However, that * call requires 10.7. */ if(name == IDR_DEFAULT_44100_MHR) - return getsectiondata(&_mh_execute_header, "binary", "default_44100_mhr", size); + return getsectiondata(&_mh_dylib_header, "binary", "default_44100", size); if(name == IDR_DEFAULT_48000_MHR) - return getsectiondata(&_mh_execute_header, "binary", "default_48000_mhr", size); + return getsectiondata(&_mh_dylib_header, "binary", "default_48000", size); #else if(name == IDR_DEFAULT_44100_MHR) - return getsectdata("binary", "default_44100_mhr", size); + return getsectdata("binary", "default_44100", size); if(name == IDR_DEFAULT_48000_MHR) - return getsectdata("binary", "default_48000_mhr", size); + return getsectdata("binary", "default_48000", size); #endif *size = 0; return NULL; |