[openal] Releasing openal-soft with linux games

Mark Sibly blitzmunter at gmail.com
Wed Jun 18 23:34:51 EDT 2014


Thanks for that!

I'm mainly just interested in diagnosing people's audio problems, not
munging up my app or anything dodgy like that. For example, I'm not yet
even sure whether *my* app is using openal-soft or not on my new ubuntu
setup, since openal 'just works'.



On Thu, Jun 19, 2014 at 10:32 AM, Chris Robinson <chris.kcat at gmail.com>
wrote:

> On 06/15/2014 08:44 PM, Mark Sibly wrote:
>
>> Another quicky: How can I tell whether the system openal is in fact
>> openal-soft? And if so, which version?
>>
>
> Generally speaking, you should check for the capabilities that you
> actually want (extensions, function behaviors, etc), rather than the
> specific implementation/version. It's entirely possible for another
> implementation to come around, now or in the future, that does everything
> you need, and there's no real reason to restrict it. Of course, having a
> default version (which you built/tested with, and ship with) is entirely
> reasonable.
>
> But if you really want to check, the AL_VERSION string will tell you. For
> OpenAL Soft, it's in the format:
>
> <core_major>.<core_minor> ALSOFT <lib_major>.<lib_minor>[.<lib_rev>]
>
> So to parse that using sscanf, you can do:
>
> int alsoftver[2];
> const ALchar *verstring = alGetString(AL_VERSION);
> int ret = sscanf(verstring, "%*d.%*d ALSOFT %d.%d", &alsoftver[0],
>                  &alsoftver[1]);
> if(ret == 2)
>     printf("Detected OpenAL Soft, library version %d.%d",
>             alsoftver[0], alsoftver[1]);
>
> The lib may have a third version point, but not all versions report it. If
> you want it, you could do:
>
> int alsoftver[3];
> const ALchar *verstring = alGetString(AL_VERSION);
> int ret = sscanf(verstring, "%*d.%*d ALSOFT %d.%d.%d", &alsoftver[0],
>                  &alsoftver[1], &alsoftver[2]);
> if(ret >= 2)
> {
>     if(ret == 2)
>         alsoftver[2] = 0;
>     printf("Detected OpenAL Soft, library version %d.%d.%d",
>             alsoftver[0], alsoftver[1], alsoftver[2]);
> }
>
>
> Note that you can only safely call alGetString after a context has been
> made current, and it applies only to the device that context belongs to.
>
> _______________________________________________
> openal mailing list
> openal at openal.org
> http://openal.org/mailman/listinfo/openal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openal.org/pipermail/openal/attachments/20140619/b18b0aae/attachment.html>


More information about the openal mailing list