From a03744c349f048e3fdba5892e619c939817096e7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 17 May 2006 21:27:29 +0000 Subject: updates for polypaudio 0.9.0 git-svn-id: file:///home/lennart/svn/public/libao-pulse/trunk@22 a8d83910-18e2-0310-866c-8ed7f9518005 --- src/ao_polyp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/ao_polyp.c') diff --git a/src/ao_polyp.c b/src/ao_polyp.c index ba4fb08..7a45605 100644 --- a/src/ao_polyp.c +++ b/src/ao_polyp.c @@ -29,6 +29,8 @@ #include #include +#include + #include #include @@ -55,10 +57,6 @@ typedef struct ao_polyp_internal { char *server, *sink; } ao_polyp_internal; -/* Dirty trick: import these two functions from polyplib */ -char *pa_get_binary_name(char *s, size_t l); -char *pa_path_get_filename(const char *p); - /* Yes, this is very ugly, but required nonetheless... */ static void disable_sigpipe(void) { struct sigaction sa; @@ -73,7 +71,8 @@ static void disable_sigpipe(void) { } int ao_plugin_test(void) { - char p[PATH_MAX], t[256], t2[256], *fn = NULL; + char p[PATH_MAX], t[256], t2[256]; + const char *fn = NULL; struct pa_simple *s; static const struct pa_sample_spec ss = { .format = PA_SAMPLE_S16LE, @@ -92,7 +91,7 @@ int ao_plugin_test(void) { snprintf(t2, sizeof(t2), "libao[%s] test", fn); } - if (!(s = pa_simple_new(NULL, fn ? t : "libao", PA_STREAM_PLAYBACK, NULL, fn ? t2 : "libao test", &ss, NULL, NULL))) + if (!(s = pa_simple_new(NULL, fn ? t : "libao", PA_STREAM_PLAYBACK, NULL, fn ? t2 : "libao test", &ss, NULL, NULL, NULL))) return 0; pa_simple_free(s); @@ -138,7 +137,8 @@ int ao_plugin_set_option(ao_device *device, const char *key, const char *value) } int ao_plugin_open(ao_device *device, ao_sample_format *format) { - char p[PATH_MAX], t[256], t2[256], *fn = NULL; + char p[PATH_MAX], t[256], t2[256]; + const char *fn = NULL; ao_polyp_internal *internal; struct pa_sample_spec ss; @@ -167,7 +167,7 @@ int ao_plugin_open(ao_device *device, ao_sample_format *format) { snprintf(t2, sizeof(t2), "libao[%s] playback stream", fn); } - if (!(internal->simple = pa_simple_new(internal->server, fn ? t : "libao", PA_STREAM_PLAYBACK, internal->sink, fn ? t2 : "libao playback stream", &ss, NULL, NULL))) + if (!(internal->simple = pa_simple_new(internal->server, fn ? t : "libao", PA_STREAM_PLAYBACK, internal->sink, fn ? t2 : "libao playback stream", &ss, NULL, NULL, NULL))) return 0; device->driver_byte_format = AO_FMT_NATIVE; -- cgit