really fix API version API

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@249 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-09-29 19:13:55 +00:00
parent 6dfab4ec7b
commit d09240118c
7 changed files with 23 additions and 10 deletions

View file

@ -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}"

View file

@ -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

View file

@ -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);
}
}

View file

@ -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

View file

@ -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

View file

@ -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;
}

View file

@ -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