[Openal] alcCloseDevice

Daniel PEACOCK dpeacock at creativelabs.com
Thu Dec 6 14:08:59 PST 2007





OpenAL v 1.0 did not have a return value for alcCloseDevice - making it
impossible for an AL implementation to tell the application that the device
hadn't been closed properly.   Most of the early implementations therefore
*had* to clean-up to prevent a crash and / or losing resources.    Once
something like that is out in the wild you can't really take it out in case
some existing applications rely on the behaviour.

Of course, every AL application should ideally stop all the Sources
playing, attach NULL Buffers to each one, delete all the Buffers, delete
all the Sources, make the current context NULL, destroy the context and
call alcCloseDevice.  But there is no guarantee that every application will
do that.

Dan

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.




                                                                           
             "Quattro IV"                                                  
             <quattro004 at gmail                                             
             .com>                                                      To 
             Sent by:                  openal at opensource.creative.com      
             openal-bounces at op                                          cc 
             ensource.creative                                             
             .com                                                  Subject 
                                       [Openal] alcCloseDevice             
                                                                           
             12/06/2007 01:38                                              
             PM                                                            
                                                                           
                                                                           
                                                                           




Hi, I think I discovered a bug in either the documentation or the code not
sure which. The documentation for the alcCloseDevice function says
"ALC_TRUE will be returned on success or ALC_FALSE on failure. Closing a
device will fail if the device contains any contexts or buffers. ",
however, I noticed that you can actually call this function without
destroying the context and it doesn't fail. Is this behavior as designed or
is the documentation incorrect? Thanks.

Reese_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal

ForwardSourceID:NT00054A1A



More information about the Openal mailing list