From a66204cd121b8d6f74dffa36d10631ee992cebe7 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 19 Apr 2004 15:12:32 +0000 Subject: [PATCH] Added snd_asoundlib_version() --- include/global.h | 2 ++ src/Versions | 1 + src/error.c | 9 +++++++++ 3 files changed, 12 insertions(+) diff --git a/include/global.h b/include/global.h index f6b5fc3e..9a91803f 100644 --- a/include/global.h +++ b/include/global.h @@ -41,6 +41,8 @@ extern "C" { * \{ */ +const char *snd_asoundlib_version(void); + #ifndef ATTRIBUTE_UNUSED /** do not print warning (gcc) when function parameter is not used */ #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) diff --git a/src/Versions b/src/Versions index a9c81809..c4d30655 100644 --- a/src/Versions +++ b/src/Versions @@ -156,6 +156,7 @@ ALSA_1.0.4 { ALSA_1.0.5 { global: + snd_asoundlib_version; snd_timer_params_set_early_event; snd_timer_params_get_early_event; } ALSA_1.0.4; diff --git a/src/error.c b/src/error.c index 0b52a7e8..3595ed21 100644 --- a/src/error.c +++ b/src/error.c @@ -102,3 +102,12 @@ int snd_lib_error_set_handler(snd_lib_error_handler_t handler) snd_lib_error = handler == NULL ? snd_lib_error_default : handler; return 0; } + +/** + * \brief Returns the ALSA sound library version in ASCII format + * \return The ASCII description of the used ALSA sound library. + */ +const char *snd_asoundlib_version(void) +{ + return SND_LIB_VERSION_STR; +} -- 2.47.1