thestk / rtaudio

A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO, and WASAPI) operating systems.
Other
1.49k stars 318 forks source link

Version number parts as numeric defines #363

Closed osch closed 1 year ago

osch commented 2 years ago

Version number parts as numeric defines to let other code use preprocessor conditionals for supporting different versions at compile time.

With this it would be possible to write somtehing like this:

#if RTAUDIO_VERSION_MAJOR >= 6
   ...
#else
...
#endif

to support different RtAudio versions without the need to use external tools like pkg-config. This would make it much easier for example to support different RtAudio versions when building Lua packages using Luarocks, see for example https://luarocks.org/modules/osch/lrtaudio