summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--doc/todo1
-rw-r--r--polyp/pacat.c7
-rw-r--r--polyp/pactl.c2
-rw-r--r--polyp/paplay.c2
-rw-r--r--polyp/polyplib-context.c9
-rw-r--r--polyp/polyplib-version.h.in10
7 files changed, 23 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 3a0675c3..af766847 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,8 @@ AM_INIT_AUTOMAKE([foreign -Wall])
AC_SUBST(PA_MAJORMINOR, "$PACKAGE_VERSION")
AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/polypaudio/])
+AC_SUBST(PA_API_VERSION, 6)
+
if type -p stow > /dev/null && test -d /usr/local/stow ; then
AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
diff --git a/doc/todo b/doc/todo
index 439eb770..bef5b82a 100644
--- a/doc/todo
+++ b/doc/todo
@@ -9,7 +9,6 @@
- improve module-oss-mmap latency measurement
- pacat sample type args
- filter capture data in client through alignment
-- add tunnel module for sources
- add radio module
- make autoload list use idxset
- libwrap
diff --git a/polyp/pacat.c b/polyp/pacat.c
index 1eb37d4d..67242b26 100644
--- a/polyp/pacat.c
+++ b/polyp/pacat.c
@@ -36,8 +36,9 @@
#include <polyp/polyplib-error.h>
#include <polyp/mainloop.h>
#include <polyp/mainloop-signal.h>
+#include <polyp/polyplib-version.h>
-#if PA_API_VERSION != PA_API_VERSION_0_6
+#if PA_API_VERSION != 6
#error Invalid Polypaudio API version
#endif
@@ -107,7 +108,7 @@ static void stream_read_callback(struct pa_stream *s, const void*data, size_t le
mainloop_api->io_enable(stdio_event, PA_IO_EVENT_OUTPUT);
if (buffer) {
- fprintf(stderr, "Buffer overrrun, dropping incoming data\n");
+ fprintf(stderr, "Buffer overrun, dropping incoming data\n");
return;
}
@@ -133,7 +134,7 @@ static void stream_state_callback(struct pa_stream *s, void *userdata) {
case PA_STREAM_FAILED:
default:
- fprintf(stderr, "Stream errror: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
+ fprintf(stderr, "Stream error: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
quit(1);
}
}
diff --git a/polyp/pactl.c b/polyp/pactl.c
index cf2f51c3..fbedc6fa 100644
--- a/polyp/pactl.c
+++ b/polyp/pactl.c
@@ -41,7 +41,7 @@
#include <polyp/mainloop-signal.h>
#include <polyp/sample.h>
-#if PA_API_VERSION != PA_API_VERSION_0_6
+#if PA_API_VERSION != 6
#error Invalid Polypaudio API version
#endif
diff --git a/polyp/paplay.c b/polyp/paplay.c
index 89358a51..cc466e12 100644
--- a/polyp/paplay.c
+++ b/polyp/paplay.c
@@ -40,7 +40,7 @@
#include <polyp/mainloop-signal.h>
#include <polyp/polyplib-version.h>
-#if PA_API_VERSION != PA_API_VERSION_0_6
+#if PA_API_VERSION != 6
#error Invalid Polypaudio API version
#endif
diff --git a/polyp/polyplib-context.c b/polyp/polyplib-context.c
index d2fae0af..b736daa7 100644
--- a/polyp/polyplib-context.c
+++ b/polyp/polyplib-context.c
@@ -676,10 +676,6 @@ struct pa_operation* pa_context_send_simple_command(struct pa_context *c, uint32
return pa_operation_ref(o);
}
-const char* pa_get_library_version(void) {
- return PACKAGE_VERSION;
-}
-
struct pa_operation* pa_context_set_default_sink(struct pa_context *c, const char *name, void(*cb)(struct pa_context*c, int success, void *userdata), void *userdata) {
struct pa_tagstruct *t;
struct pa_operation *o;
@@ -744,3 +740,8 @@ struct pa_operation* pa_context_set_name(struct pa_context *c, const char *name,
return pa_operation_ref(o);
}
+
+const char* pa_get_library_version(void) {
+ return PACKAGE_VERSION;
+}
+
diff --git a/polyp/polyplib-version.h.in b/polyp/polyplib-version.h.in
index b44dc008..75798693 100644
--- a/polyp/polyplib-version.h.in
+++ b/polyp/polyplib-version.h.in
@@ -22,6 +22,8 @@
USA.
***/
+/* WARNING: Make sure to edit the real source file polyplib-version.h.in! */
+
/** \file
* Define header version */
@@ -30,4 +32,12 @@ a macro and not a function, so it is impossible to get the pointer of
it. */
#define pa_get_headers_version() ("@PACKAGE_VERSION@")
+/** Return the version of the library the current application is linked to. */
+const char* pa_get_library_version(void);
+
+/** The current API version. Version 6 relates to polypaudio
+ * 0.6. Prior versions (i.e. Polypaudio 0.5.1 and older) have
+ * PA_API_VERSION undefined. */
+#define PA_API_VERSION @PA_API_VERSION@
+
#endif