Austin Hicks
unread,Sep 2, 2016, 4:36:33 PM9/2/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to libaud...@camlorn.net
Hi,
The CI is still building the alpha, so it won't be up for a little
while. Three notable changes:
- Lav_initialize and Lav_shutdown remember how many times they have been
called. The first time you call Lav_initialize, Libaudioverse
initializes. After that, it just increments a counter. To shut down
the library, you must call Lav_shutdown exactly as many times as you
called Lav_initialize. Duplicate calls to these functions are reflected
in the log. The point is to allow things like NVDA add-ons or other
plugin scenarios to use these functions safely, and without stomping on
other people.
- Some functions will now error if the library is not initialized, most
notably Lav_createServer.
- Python has a new thing, InitializationManager. Throw this around your
main function and/or block of code that starts your app:
with libaudioverse.InitializationManager():
#stuff
and it will handle initialization and shutdown for you. Unlike the old
approach of manually calling initialize() and shutdown(), this will
behave correctly in the event that an uncaught exception reaches your
main block of code. Use this. As the Python docstring points out,
failure to call shutdown() will cause crashes in some cases, which means
that this prevents your app's crash from becoming a Libaudioverse crash,
usually manifested as a segfault or a "This application has stopped
working" dialog on Windows.