From c6c5425075f2f076540eb0eb2c0d99f1460010a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kokem=C3=BCller?= Date: Mon, 25 Nov 2013 15:20:35 +0100 Subject: [PATCH] query library version --- ebur128/ebur128.c | 6 ++++++ ebur128/ebur128.h | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ebur128/ebur128.c b/ebur128/ebur128.c index 13c0881..3c94f39 100644 --- a/ebur128/ebur128.c +++ b/ebur128/ebur128.c @@ -210,6 +210,12 @@ static void ebur128_destroy_resampler(ebur128_state* st) { } #endif +void ebur128_get_version(int* major, int* minor, int* patch) { + *major = EBUR128_VERSION_MAJOR; + *minor = EBUR128_VERSION_MINOR; + *patch = EBUR128_VERSION_PATCH; +} + ebur128_state* ebur128_init(unsigned int channels, unsigned long samplerate, int mode) { diff --git a/ebur128/ebur128.h b/ebur128/ebur128.h index 5ee6f6e..cc22a58 100644 --- a/ebur128/ebur128.h +++ b/ebur128/ebur128.h @@ -12,6 +12,10 @@ extern "C" { #endif +#define EBUR128_VERSION_MAJOR 1 +#define EBUR128_VERSION_MINOR 0 +#define EBUR128_VERSION_PATCH 0 + #include /* for size_t */ /** \enum channel @@ -74,6 +78,14 @@ typedef struct { struct ebur128_state_internal* d; /**< Internal state. */ } ebur128_state; +/** \brief Get library version number. Do not pass null pointers here. + * + * @param major major version number of library + * @param minor minor version number of library + * @param patch patch version number of library + */ +void ebur128_get_version(int* major, int* minor, int* patch); + /** \brief Initialize library state. * * @param channels the number of channels.