olofson / audiality2

A realtime scripted modular audio engine for video games and musical applications.
http://audiality.org/
zlib License
80 stars 5 forks source link

Version checking in a2_Open() #314

Closed olofson closed 7 years ago

olofson commented 7 years ago

Since binary compatibility is not guaranteed between'micro versions in development branches (odd minors) - for example 1.9.1 vs 1.9.2 - a2_Open() should be wrapped with an inline function, which passes a2_HeaderVersion() (that is, the version the application is compiled against) as an argument to the actual "open" call, so that it can fail and set a2_LastError() to A2_INCOMPATIBLELIB or something, when appropriate.

While it's still a bad idea to install development branch libs (1.9.x, 2.1.x etc) in the system, this will at least prevent mismatches from causing mysterious weirdness and nasty segfaults for no apparent reason.