[Openal-devel] Possible bug in openal 0.0.8 on linux

Juergen Wind juergen.wind at wind-software.de
Mon Mar 27 02:03:36 PST 2006


Hi Sven,

I think I've found the solution. ( Works for me !)
I have attached a patch to alc_context.c

Bye,

Juergen


Sven Panne wrote:
> Thanks for the report, it looks like a known bug triggered by an alutInit/alutExit/alutInit/alutExit sequence, too. The code involved is a bit obscure, and I'll have to think about how to fix this correctly. In the meantime, if anybody already has an idea/patch, I'd be glad to see it...
> 
> Cheers,
>    S.
> 
>> -----Original Message-----
>> From: openal-devel-admin at opensource.creative.com 
>> [mailto:openal-devel-admin at opensource.creative.com] On Behalf 
>> Of Juergen Wind
>> Sent: Samstag, 25. März 2006 22:40
>> To: openal-devel at opensource.creative.com
>> Subject: Re: [Openal-devel] Possible bug in openal 0.0.8 on linux
>>
>> A little follow-up on this one:
>>
>> It seems to have to do with alcMakeContextCurrent(0).
>> The attached code gives a segfault as well. The same code without
>> alcMakeContextCurrent(0) that switches between two contexts works.
>>
>> Regards,
>>
>> Juergen
>>
>>
>> Juergen Wind wrote:
>>> Hi,
>>>
>>> I think that I found a bug in openal 0.0.8 on SuSE 10.0 ( 
>> self-compiled).
>>> If you do this: open a device, create a context, bind this, 
>> unbind it, 
>>> destroy it, create a new one and bind it, it breaks at the 
>> 2nd context 
>>> bind with a segfault.
>>>
>>> It even happens if you close and reopen the device in between.
>>> [...]
> 
-------------- next part --------------
--- ./alc_context.c.orig	2006-01-23 18:01:13.000000000 +0100
+++ alc_context.c	2006-03-27 11:54:30.000000000 +0200
@@ -236,8 +236,12 @@
 		/* someone unpaused us */
 		ispaused = AL_FALSE;
 
-		_alcDeviceResume( cc->write_device );
-		_alcDeviceResume( cc->read_device );
+		if (cc->write_device) {
+			_alcDeviceResume( cc->write_device );
+		}
+		if (cc->read_device) {
+			_alcDeviceResume( cc->read_device );
+		}
 
 		_alcUnlockAllContexts();
 		_alUnlockMixerPause();


More information about the Openal-devel mailing list