LaurentGomila/SFML — pull request #602 by binary1248 (2014-05-18 18:02:57+00:00)
Title: Fix OpenAL context management

I Introduced AlResource to manage contexts the same way it is done for GlResources. The Listener properties are now part of the context itself and thus moved to the rest of the AudioDevice code so they can be delay applied if the user chooses to set them before a resource is constructed and reapplied if there is temporarily no context. sf::Listener just proxies everything to the AudioDevice which stores the values itself. This way no changes to the public API have to be made.

Because the AL context lifetime is tied to the lifetime of the resources that require it, unless the user decides to have global audio resources, the context should be destroyed before main() returns. This is a fix for #30.