On 04/14/2010 09:24 PM, Maarten Lankhorst wrote:
> ---
> I cannot query the version string unless a device context is created.
> Since OpenAL-1.12 added support for thread local contexts I use that to
> determine whether pulseaudio should be ignored or not. OpenAL 1.10 and
> older will crash on pulseaudio. Since other os's don't support
> pulseaudio it is safe.
> +static void boycott_pulse(const char *devstr, const char **defstr) {
The function is badly named. It doesn't "boycott" PA but doesn't uses it
on older OpenAL versions.
> + if (!blacklist_pulse && !local_contexts) {
> + WARN("Disabling pulseaudio because of old openal version\n");
> + blacklist_pulse = 1;
> + }
> + if (!blacklist_pulse || !devstr || strncmp(*defstr, "PulseAudio ", 11))
> + return;
> + while (*devstr && !strncmp(devstr, "PulseAudio ", 11)) {
> + devstr += strlen(devstr) + 1;
> + }
> + TRACE("New default: %s\n", devstr);
> + *defstr = devstr;
> +}
> +
bye
michael