/* $Id$ */
/***
- This file is part of polypaudio.
+ This file is part of PulseAudio.
- polypaudio is free software; you can redistribute it and/or modify
+ PulseAudio is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
- polypaudio is distributed in the hope that it will be useful, but
+ PulseAudio is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with polypaudio; if not, write to the Free Software
+ along with PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
#include <jack/jack.h>
-#include <polyp/xmalloc.h>
+#include <pulse/xmalloc.h>
-#include <polypcore/iochannel.h>
-#include <polypcore/sink.h>
-#include <polypcore/module.h>
-#include <polypcore/core-util.h>
-#include <polypcore/modargs.h>
-#include <polypcore/log.h>
-#include <polyp/mainloop-api.h>
+#include <pulsecore/core-error.h>
+#include <pulsecore/iochannel.h>
+#include <pulsecore/sink.h>
+#include <pulsecore/module.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/modargs.h>
+#include <pulsecore/log.h>
+#include <pulse/mainloop-api.h>
#include "module-jack-sink-symdef.h"
jack_nframes_t frames_requested;
int quit_requested;
+ int pipe_fd_type;
int pipe_fds[2];
pa_io_event *io_event;
assert(u);
assert(u->pipe_fds[0] == fd);
- read(fd, &x, 1);
+ pa_read(fd, &x, 1, &u->pipe_fd_type);
if (u->quit_requested) {
stop_sink(u);
assert(u);
assert(u->pipe_fds[1] >= 0);
- write(u->pipe_fds[1], &c, 1);
+ pa_write(u->pipe_fds[1], &c, 1, &u->pipe_fd_type);
}
static void jack_shutdown(void *arg) {
jack_status_t status;
const char *server_name, *client_name;
uint32_t channels = 0;
- int connect = 1;
+ int do_connect = 1;
unsigned i;
const char **ports = NULL, **p;
goto fail;
}
- if (pa_modargs_get_value_boolean(ma, "connect", &connect) < 0) {
+ if (pa_modargs_get_value_boolean(ma, "connect", &do_connect) < 0) {
pa_log(__FILE__": failed to parse connect= argument.");
goto fail;
}
server_name = pa_modargs_get_value(ma, "server_name", NULL);
- client_name = pa_modargs_get_value(ma, "client_name", "polypaudio");
+ client_name = pa_modargs_get_value(ma, "client_name", "PulseAudio");
u = pa_xnew0(struct userdata, 1);
m->userdata = u;
u->core = c;
u->module = m;
u->pipe_fds[0] = u->pipe_fds[1] = -1;
+ u->pipe_fd_type = 0;
pthread_mutex_init(&u->mutex, NULL);
pthread_cond_init(&u->cond, NULL);
if (pipe(u->pipe_fds) < 0) {
- pa_log(__FILE__": pipe() failed: %s", strerror(errno));
+ pa_log(__FILE__": pipe() failed: %s", pa_cstrerror(errno));
goto fail;
}
goto fail;
}
- if (connect) {
+ if (do_connect) {
for (i = 0, p = ports; i < ss.channels; i++, p++) {
if (!*p) {