From 153757be2e8e5ab65913e7bbd0e5ebcc60c8e467 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 22 Feb 2006 15:38:52 +0000 Subject: Fixes for polyp plugin From: Pierre Ossman There shouldn't be any more API changes until polypaudio 0.8 that affect this plugin. I am working on supporting capture volume and mute switches, but that should be a strict addition (i.e. it can wait until the next release if things get tight). --- configure.in | 2 +- polyp/pcm_polyp.c | 6 +++--- polyp/polyp.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index 7efad81..33d6205 100644 --- a/configure.in +++ b/configure.in @@ -15,7 +15,7 @@ AC_CHECK_LIB(asound, snd_pcm_ioplug_create,, PKG_CHECK_MODULES(JACK, jack >= 0.98, [HAVE_JACK=yes], [HAVE_JACK=no]) AM_CONDITIONAL(HAVE_JACK, test x$HAVE_JACK = xyes) -PKG_CHECK_MODULES(polypaudio, [polyplib polyplib-mainloop], [HAVE_POLYP=yes], [HAVE_POLYP=no]) +PKG_CHECK_MODULES(polypaudio, [polyplib], [HAVE_POLYP=yes], [HAVE_POLYP=no]) AM_CONDITIONAL(HAVE_POLYP, test x$HAVE_POLYP = xyes) SAVE_PLUGINS_VERSION diff --git a/polyp/pcm_polyp.c b/polyp/pcm_polyp.c index e3ea506..84e3c34 100644 --- a/polyp/pcm_polyp.c +++ b/polyp/pcm_polyp.c @@ -210,7 +210,7 @@ static snd_pcm_sframes_t polyp_write(snd_pcm_ioplug_t *io, buf = (char *)areas->addr + (areas->first + areas->step * offset) / 8; - pa_stream_write(pcm->stream, buf, size * pcm->frame_size, NULL, 0); + pa_stream_write(pcm->stream, buf, size * pcm->frame_size, NULL, 0, 0); /* Make sure the buffer pointer is in sync */ update_ptr(pcm); @@ -245,7 +245,7 @@ static snd_pcm_sframes_t polyp_read(snd_pcm_ioplug_t *io, dst_buf = (char *)areas->addr + (areas->first + areas->step * offset) / 8; while (remain_size > 0) { - pa_stream_peek(pcm->stream, (void**)&src_buf, &frag_length); + pa_stream_peek(pcm->stream, (const void**)&src_buf, &frag_length); if (frag_length == 0) break; @@ -352,7 +352,7 @@ static int polyp_prepare(snd_pcm_ioplug_t *io) assert(pcm->stream); if (io->stream == SND_PCM_STREAM_PLAYBACK) - pa_stream_connect_playback(pcm->stream, pcm->device, &pcm->buffer_attr, 0, NULL); + pa_stream_connect_playback(pcm->stream, pcm->device, &pcm->buffer_attr, 0, NULL, NULL); else pa_stream_connect_record(pcm->stream, pcm->device, &pcm->buffer_attr, 0); diff --git a/polyp/polyp.c b/polyp/polyp.c index 139152f..0b25ae5 100644 --- a/polyp/polyp.c +++ b/polyp/polyp.c @@ -234,7 +234,7 @@ int polyp_connect(snd_polyp_t *p, const char *server) assert(p && p->context && p->mainloop && (p->state == POLYP_STATE_INIT)); - err = pa_context_connect(p->context, server, 1, NULL); + err = pa_context_connect(p->context, server, 0, NULL); if (err < 0) goto error; -- cgit