[openal] Making OpenAL Soft more "portable"?

Marvin -SShock circumflex at gmx.net
Sat Jun 4 09:37:23 EDT 2016


> The main issue is that the "game folder" isn't a particularly 
> well-defined place. On Windows it's relatively easy to get (IIRC, 
> there's a function call to get the full path to the process's 
> executable), but on Linux, the idea of a game folder is actually pretty 
> hazy since executables, data, and configs are installed in separate 
> places -- and even in cases where the whole game is in a self-contained 
> directory, there's no safe and portable way to get the full path to the 
> executable, as far as I'm aware. On OSX, I don't know where to even start.

It could be implemented as an OS-specific feature then, but I can understand if you hesitate to make OALS too platform-dependent this way

> Unfortunately I don't think there's anything I can do from OpenAL Soft. 
> Even if it was a good idea to change the device's sample rate, I don't 
> think it can be changed by normal processes (it's a system setting that 
> only users with elevated or admin privileges can change, I believe), and 
> Windows' audio system doesn't support resampling on its end, requiring 
> the client to provide audio in the native rate.
> 
> Ultimately it's better to advise users that they don't really need to go 
> above 44.1 or 48khz for normal audio playback. Unless they're doing 
> studio-grade work with studio-grade equipment, 96khz and up won't gain 
> anything except higher CPU use.

That's a bummer. So some level of user internvetion is aloways required, then.

> Generally speaking, config settings are supposed to be for user- or 
> system-specific options, rather than app-specific. Anything various apps 
> would be interested in should instead be accessible through an OpenAL 
> API extension.
> 
> But in the case where different apps do actually need different config 
> settings, the ALSOFT_CONF environment variable can be used to specify 
> another config file with extra settings (which also allows it to be 
> shared too, if you have multiple apps that need the same tweaks).

Thanks for reminding me about it. It doesn't solve the issue of overriding the sampling rate, but it's something. In any case, thanks for your detailed answer and keep up the good work!


More information about the openal mailing list