[Openal] AL error states and threads
Daniel PEACOCK
dpeacock at creativelabs.com
Mon Nov 26 13:19:40 PST 2007
Hi Brian,
I agree that this is something which should be addressed in the future.
As for OpenGL ... I could be wrong here, but I thought the same problem
existed there, and the only solution was to use multiple Contexts?
Dan
Creative Labs, Inc.
Notice
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or
any action taken by you in reliance on it, is prohibited and may be
unlawful. If you have received this message in error, please delete it
and contact the sender immediately. Thank you.
Brian Meidell
Andersen
<brian at gameequati To
on.com> openal at opensource.creative.com
Sent by: cc
openal-bounces at op
ensource.creative Subject
.com Re: [Openal] AL error states and
threads
11/26/2007 11:26
AM
Thanks for the answer!
I've already solved the problem that I was having, but wouldn't it be a
good idea to change this in the spec and implementation for the future?
Reasons:
1) It's what OpenGL does
2) It would make it possible to follow the recommended alGetError()...
alWhateverCall()... alGetError() flow, without the need to mutex every
single OpenAL call set
3) I have a hard time thinking of any drawbacks, beyond the fact that
someone needs to implement the change.
The fact that the error state is not stored per thread right now, makes
the fact that OpenAL is thread safe an almost moot point if you want to
implement error checking in your program, since you need to litter your
code with mutexes around every alGetError/alWhateverCall/alGetError set
anyway.
Just a thought.
/Brian
Daniel PEACOCK wrote:
>
> Hi Brian,
>
> >> If I have two threads, A and B, does a bad alSomething
> >> call on thread A return an error for alGetError in thread B?
>
> Unfortunately the answer is "yes" because the error is stored
> per-Context. This is one of the downsides to have function calls that
> don't return error codes.
>
> Dan
> Creative Labs, Inc.
>
> ourceID:NT000522FA
_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal
ForwardSourceID:NT00052786
More information about the Openal
mailing list