}
if ((r = pa_iochannel_read(c->io, (uint8_t*) c->playback.current_memblock->data+c->playback.memblock_index, l)) <= 0) {
- pa_log_debug(__FILE__": read() failed: %s\n", r == 0 ? "EOF" : strerror(errno));
+ pa_log_debug(__FILE__": read() failed: %s", r == 0 ? "EOF" : strerror(errno));
return -1;
}
if ((r = pa_iochannel_write(c->io, (uint8_t*) chunk.memblock->data+chunk.index, chunk.length)) < 0) {
pa_memblock_unref(chunk.memblock);
- pa_log(__FILE__": write(): %s\n", strerror(errno));
+ pa_log(__FILE__": write(): %s", strerror(errno));
return -1;
}
assert(s && io && p);
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
- pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.\n", MAX_CONNECTIONS);
+ pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
pa_iochannel_free(io);
return;
}
size_t l;
if (!(sink = pa_namereg_get(p->core, p->sink_name, PA_NAMEREG_SINK, 1))) {
- pa_log(__FILE__": Failed to get sink.\n");
+ pa_log(__FILE__": Failed to get sink.");
goto fail;
}
if (!(c->sink_input = pa_sink_input_new(sink, __FILE__, c->client->name, &p->sample_spec, NULL, 0, -1))) {
- pa_log(__FILE__": Failed to create sink input.\n");
+ pa_log(__FILE__": Failed to create sink input.");
goto fail;
}
size_t l;
if (!(source = pa_namereg_get(p->core, p->source_name, PA_NAMEREG_SOURCE, 1))) {
- pa_log(__FILE__": Failed to get source.\n");
+ pa_log(__FILE__": Failed to get source.");
goto fail;
}
c->source_output = pa_source_output_new(source, __FILE__, c->client->name, &p->sample_spec, NULL, -1);
if (!c->source_output) {
- pa_log(__FILE__": Failed to create source output.\n");
+ pa_log(__FILE__": Failed to create source output.");
goto fail;
}
c->source_output->owner = p->module;
p->sample_spec = core->default_sample_spec;
if (pa_modargs_get_sample_spec(ma, &p->sample_spec) < 0) {
- pa_log(__FILE__": Failed to parse sample type specification.\n");
+ pa_log(__FILE__": Failed to parse sample type specification.");
goto fail;
}
enable = 0;
if (pa_modargs_get_value_boolean(ma, "record", &enable) < 0) {
- pa_log(__FILE__": record= expects a numeric argument.\n");
+ pa_log(__FILE__": record= expects a numeric argument.");
goto fail;
}
p->mode = enable ? RECORD : 0;
enable = 1;
if (pa_modargs_get_value_boolean(ma, "playback", &enable) < 0) {
- pa_log(__FILE__": playback= expects a numeric argument.\n");
+ pa_log(__FILE__": playback= expects a numeric argument.");
goto fail;
}
p->mode |= enable ? PLAYBACK : 0;
if ((p->mode & (RECORD|PLAYBACK)) == 0) {
- pa_log(__FILE__": neither playback nor recording enabled for protocol.\n");
+ pa_log(__FILE__": neither playback nor recording enabled for protocol.");
goto fail;
}