From 41bf7d8d72964890ca435ba21543fbdeca9bc3b7 Mon Sep 17 00:00:00 2001 From: Jack Moffitt <jack@xiph.org> Date: Sat, 24 Feb 2001 01:18:50 +0000 Subject: [PATCH] added new function suggested by rik@kde.org updated library version for release git-svn-id: http://svn.xiph.org/trunk/ao@1328 0101bb08-14d6-0310-b084-bc0e0c8e3800 --- configure.in | 2 +- include/ao/ao.h | 1 + src/audio_out.c | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 992a886..6d5a844 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AM_DISABLE_STATIC dnl Library versioning LIB_CURRENT=1 LIB_REVISION=0 -LIB_AGE=0 +LIB_AGE=1 AC_SUBST(LIB_CURRENT) AC_SUBST(LIB_REVISION) AC_SUBST(LIB_AGE) diff --git a/include/ao/ao.h b/include/ao/ao.h index 08f1bd9..8f2029b 100644 --- a/include/ao/ao.h +++ b/include/ao/ao.h @@ -95,6 +95,7 @@ void ao_play(ao_device_t *device, void* output_samples, uint_32 num_bytes); void ao_close(ao_device_t *device); /* misc functions */ +int ao_get_driver_count(void); int ao_is_big_endian(void); #ifdef __cplusplus diff --git a/src/audio_out.c b/src/audio_out.c index 62002bb..0b50416 100644 --- a/src/audio_out.c +++ b/src/audio_out.c @@ -318,3 +318,17 @@ int ao_is_big_endian(void) if (bytewise[0] == 0xba) return 1; return 0; } + +int ao_get_driver_count(void) +{ + int i = 0; + + driver_tree_t *driver = driver_head; + + while (driver) { + i++; + driver = driver->next; + } + + return i; +} -- GitLab