Skip to content

Commit

Permalink
query library version
Browse files Browse the repository at this point in the history
  • Loading branch information
jiixyj committed Nov 25, 2013
1 parent 005994c commit c6c5425
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ebur128/ebur128.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
12 changes: 12 additions & 0 deletions ebur128/ebur128.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
extern "C" {
#endif

#define EBUR128_VERSION_MAJOR 1
#define EBUR128_VERSION_MINOR 0
#define EBUR128_VERSION_PATCH 0

#include <stddef.h> /* for size_t */

/** \enum channel
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit c6c5425

Please sign in to comment.