[openal] Can I set the HRTF PATH by any method other than alsoft.ini?

Chris Robinson chris.kcat at gmail.com
Sat Aug 15 19:51:34 EDT 2020


On Sat, 15 Aug 2020 22:30:23 +0300
Sean <s.tolstoyevski at gmail.com> wrote:

> Hi all,
> 
> I know that OpenAL can be configured with the alsoft.ini file.
> But for this, the user must copy the HRTF files to the appropriate 
> paths. I don't think every user can mess with this. And in some 
> projects, I want to package HRTF files with the project.
> 
> Is there a solution to introduce the PATH of HRTF files to
> Openal-Soft without using theĀ  alsoft.ini file in Openal-Soft?

You can set the ALSOFT_LOCAL_PATH environment variable in your app to
a path somewhere for your program, and OpenAL Soft will look in the
openal\hrtf\ subfolder of that path. So for example, if you call

_wputenv_s(L"ALSOFT_LOCAL_PATH", L"C:\\Program Files\\MyApp");

Then OpenAL Soft will search C:\Program Files\MyApp\openal\hrtf for
extra HRTF files. The environment variable should be set as early as
possible in your app, preferably before making any OpenAL function
calls.


More information about the openal mailing list