Remove newline at end of log messages

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
This commit is contained in:
Peter Meerwald-Stadler 2016-08-16 07:03:25 +02:00
parent 9cc778123f
commit 8b076c3ed9
18 changed files with 60 additions and 60 deletions

View file

@ -550,7 +550,7 @@ int main(int argc, char *argv[]) {
case PA_CMD_DUMP_CONF: { case PA_CMD_DUMP_CONF: {
if (d < argc) { if (d < argc) {
pa_log("Too many arguments.\n"); pa_log("Too many arguments.");
goto finish; goto finish;
} }
@ -565,7 +565,7 @@ int main(int argc, char *argv[]) {
int i; int i;
if (d < argc) { if (d < argc) {
pa_log("Too many arguments.\n"); pa_log("Too many arguments.");
goto finish; goto finish;
} }
@ -585,7 +585,7 @@ int main(int argc, char *argv[]) {
case PA_CMD_VERSION : case PA_CMD_VERSION :
if (d < argc) { if (d < argc) {
pa_log("Too many arguments.\n"); pa_log("Too many arguments.");
goto finish; goto finish;
} }
@ -597,7 +597,7 @@ int main(int argc, char *argv[]) {
pid_t pid; pid_t pid;
if (d < argc) { if (d < argc) {
pa_log("Too many arguments.\n"); pa_log("Too many arguments.");
goto finish; goto finish;
} }
@ -614,7 +614,7 @@ int main(int argc, char *argv[]) {
case PA_CMD_KILL: case PA_CMD_KILL:
if (d < argc) { if (d < argc) {
pa_log("Too many arguments.\n"); pa_log("Too many arguments.");
goto finish; goto finish;
} }
@ -628,7 +628,7 @@ int main(int argc, char *argv[]) {
case PA_CMD_CLEANUP_SHM: case PA_CMD_CLEANUP_SHM:
if (d < argc) { if (d < argc) {
pa_log("Too many arguments.\n"); pa_log("Too many arguments.");
goto finish; goto finish;
} }
@ -642,7 +642,7 @@ int main(int argc, char *argv[]) {
} }
if (d < argc) { if (d < argc) {
pa_log("Too many arguments.\n"); pa_log("Too many arguments.");
goto finish; goto finish;
} }

View file

@ -474,32 +474,32 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min, bool peri
snd_pcm_sw_params_alloca(&swparams); snd_pcm_sw_params_alloca(&swparams);
if ((err = snd_pcm_sw_params_current(pcm, swparams)) < 0) { if ((err = snd_pcm_sw_params_current(pcm, swparams)) < 0) {
pa_log_warn("Unable to determine current swparams: %s\n", pa_alsa_strerror(err)); pa_log_warn("Unable to determine current swparams: %s", pa_alsa_strerror(err));
return err; return err;
} }
if ((err = snd_pcm_sw_params_set_period_event(pcm, swparams, period_event)) < 0) { if ((err = snd_pcm_sw_params_set_period_event(pcm, swparams, period_event)) < 0) {
pa_log_warn("Unable to disable period event: %s\n", pa_alsa_strerror(err)); pa_log_warn("Unable to disable period event: %s", pa_alsa_strerror(err));
return err; return err;
} }
if ((err = snd_pcm_sw_params_set_tstamp_mode(pcm, swparams, SND_PCM_TSTAMP_ENABLE)) < 0) { if ((err = snd_pcm_sw_params_set_tstamp_mode(pcm, swparams, SND_PCM_TSTAMP_ENABLE)) < 0) {
pa_log_warn("Unable to enable time stamping: %s\n", pa_alsa_strerror(err)); pa_log_warn("Unable to enable time stamping: %s", pa_alsa_strerror(err));
return err; return err;
} }
if ((err = snd_pcm_sw_params_get_boundary(swparams, &boundary)) < 0) { if ((err = snd_pcm_sw_params_get_boundary(swparams, &boundary)) < 0) {
pa_log_warn("Unable to get boundary: %s\n", pa_alsa_strerror(err)); pa_log_warn("Unable to get boundary: %s", pa_alsa_strerror(err));
return err; return err;
} }
if ((err = snd_pcm_sw_params_set_stop_threshold(pcm, swparams, boundary)) < 0) { if ((err = snd_pcm_sw_params_set_stop_threshold(pcm, swparams, boundary)) < 0) {
pa_log_warn("Unable to set stop threshold: %s\n", pa_alsa_strerror(err)); pa_log_warn("Unable to set stop threshold: %s", pa_alsa_strerror(err));
return err; return err;
} }
if ((err = snd_pcm_sw_params_set_start_threshold(pcm, swparams, (snd_pcm_uframes_t) -1)) < 0) { if ((err = snd_pcm_sw_params_set_start_threshold(pcm, swparams, (snd_pcm_uframes_t) -1)) < 0) {
pa_log_warn("Unable to set start threshold: %s\n", pa_alsa_strerror(err)); pa_log_warn("Unable to set start threshold: %s", pa_alsa_strerror(err));
return err; return err;
} }
@ -509,7 +509,7 @@ int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min, bool peri
} }
if ((err = snd_pcm_sw_params(pcm, swparams)) < 0) { if ((err = snd_pcm_sw_params(pcm, swparams)) < 0) {
pa_log_warn("Unable to set sw params: %s\n", pa_alsa_strerror(err)); pa_log_warn("Unable to set sw params: %s", pa_alsa_strerror(err));
return err; return err;
} }
@ -1546,7 +1546,7 @@ static int mixer_class_event(snd_mixer_class_t *class, unsigned int mask,
return 0; return 0;
} }
else else
pa_log_info("Got an unknown mixer class event for %s: mask 0x%x\n", name, mask); pa_log_info("Got an unknown mixer class event for %s: mask 0x%x", name, mask);
return 0; return 0;
} }

View file

@ -137,7 +137,7 @@ static int bluez5_sco_acquire_cb(pa_bluetooth_transport *t, bool optional, size_
addr.sco_family = AF_BLUETOOTH; addr.sco_family = AF_BLUETOOTH;
bacpy(&addr.sco_bdaddr, &dst); bacpy(&addr.sco_bdaddr, &dst);
pa_log_info ("doing connect\n"); pa_log_info("doing connect");
err = connect(sock, (struct sockaddr *) &addr, sizeof(addr)); err = connect(sock, (struct sockaddr *) &addr, sizeof(addr));
if (err < 0 && !(errno == EAGAIN || errno == EINPROGRESS)) { if (err < 0 && !(errno == EAGAIN || errno == EINPROGRESS)) {
pa_log_error("connect(): %s", pa_cstrerror(errno)); pa_log_error("connect(): %s", pa_cstrerror(errno));

View file

@ -888,7 +888,7 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
dbus_error_init(&err); dbus_error_init(&err);
pa_log_debug("dbus: interface=%s, path=%s, member=%s\n", pa_log_debug("dbus: interface=%s, path=%s, member=%s",
dbus_message_get_interface(m), dbus_message_get_interface(m),
dbus_message_get_path(m), dbus_message_get_path(m),
dbus_message_get_member(m)); dbus_message_get_member(m));

View file

@ -1798,7 +1798,7 @@ static void bt_transport_config_a2dp(struct userdata *u) {
a2dp->codesize = sbc_get_codesize(&a2dp->sbc); a2dp->codesize = sbc_get_codesize(&a2dp->sbc);
a2dp->frame_length = sbc_get_frame_length(&a2dp->sbc); a2dp->frame_length = sbc_get_frame_length(&a2dp->sbc);
pa_log_info("SBC parameters:\n\tallocation=%u\n\tsubbands=%u\n\tblocks=%u\n\tbitpool=%u\n", pa_log_info("SBC parameters:\n\tallocation=%u\n\tsubbands=%u\n\tblocks=%u\n\tbitpool=%u",
a2dp->sbc.allocation, a2dp->sbc.subbands, a2dp->sbc.blocks, a2dp->sbc.bitpool); a2dp->sbc.allocation, a2dp->sbc.subbands, a2dp->sbc.blocks, a2dp->sbc.bitpool);
} }

View file

@ -155,7 +155,7 @@ static char* read_param(const char *paramname);
static int set_state(int state) { static int set_state(int state) {
static int current_state = 0; static int current_state = 0;
pa_log_debug("State transition %s->%s\n", pa_log_debug("State transition %s->%s",
xenbus_names[current_state], xenbus_names[state]); xenbus_names[current_state], xenbus_names[state]);
publish_param_int("state", state); publish_param_int("state", state);
@ -167,25 +167,25 @@ static int set_state(int state) {
/* negotiation callbacks */ /* negotiation callbacks */
static int state_unknown_cb() { static int state_unknown_cb() {
pa_log_debug("Xen audio sink: Backend state was XenbusStateUnknown\n"); pa_log_debug("Xen audio sink: Backend state was XenbusStateUnknown");
set_state(XenbusStateInitialising); set_state(XenbusStateInitialising);
return 0; return 0;
} }
static int state_initialising_cb() { static int state_initialising_cb() {
pa_log_debug("Xen audio sink: Backend state was XenbusStateInitialising\n"); pa_log_debug("Xen audio sink: Backend state was XenbusStateInitialising");
set_state(XenbusStateInitialised); set_state(XenbusStateInitialised);
return 0; return 0;
} }
static int state_initwait_cb() { static int state_initwait_cb() {
pa_log_debug("Xen audio sink: Backend state was XenbusStateInitWait\n"); pa_log_debug("Xen audio sink: Backend state was XenbusStateInitWait");
return 0; return 0;
} }
static int state_initialised_cb() { static int state_initialised_cb() {
pa_log_debug("Xen audio sink: Backend state was XenbusStateInitialised\n"); pa_log_debug("Xen audio sink: Backend state was XenbusStateInitialised");
/*Remind the backend we are ready*/ /*Remind the backend we are ready*/
set_state(XenbusStateInitialised); set_state(XenbusStateInitialised);
return 0; return 0;
@ -194,23 +194,23 @@ static int state_initialised_cb() {
static int state_connected_cb() { static int state_connected_cb() {
/* The backend accepted our parameters, sweet! */ /* The backend accepted our parameters, sweet! */
set_state(XenbusStateConnected); set_state(XenbusStateConnected);
pa_log_debug("Xen audio sink: Backend state was XenbusStateConnected\n"); pa_log_debug("Xen audio sink: Backend state was XenbusStateConnected");
return NEGOTIATION_OK; return NEGOTIATION_OK;
} }
static int state_closing_cb() { static int state_closing_cb() {
pa_log_debug("Xen audio sink: Backend state was XenbusStateClosing\n"); pa_log_debug("Xen audio sink: Backend state was XenbusStateClosing");
return 0; return 0;
} }
static int state_closed_cb() { static int state_closed_cb() {
pa_log_debug("Xen audio sink: Backend state was XenbusStateClosed\n"); pa_log_debug("Xen audio sink: Backend state was XenbusStateClosed");
return 0; return 0;
} }
static int state_reconfiguring_cb() { static int state_reconfiguring_cb() {
/* The backend rejected our sample spec */ /* The backend rejected our sample spec */
pa_log_debug("Xen audio sink: Backend state was XenbusStateReconfiguring\n"); pa_log_debug("Xen audio sink: Backend state was XenbusStateReconfiguring");
/* fall back to the backend's default parameters*/ /* fall back to the backend's default parameters*/
read_backend_default_spec(&ss); read_backend_default_spec(&ss);
/* backend should accept these now */ /* backend should accept these now */
@ -220,7 +220,7 @@ static int state_reconfiguring_cb() {
} }
static int state_reconfigured_cb() { static int state_reconfigured_cb() {
pa_log_debug("Xen audio sink: Backend state was XenbusStateReconfigured\n"); pa_log_debug("Xen audio sink: Backend state was XenbusStateReconfigured");
return 0; return 0;
} }
@ -602,7 +602,7 @@ static int alloc_gref(struct ioctl_gntalloc_alloc_gref *gref_, void **addr) {
rv = ioctl(alloc_fd, IOCTL_GNTALLOC_ALLOC_GREF, gref_); rv = ioctl(alloc_fd, IOCTL_GNTALLOC_ALLOC_GREF, gref_);
if (rv) { if (rv) {
pa_log_debug("Xen audio sink: src-add error: %s (rv=%d)\n", strerror(errno), rv); pa_log_debug("Xen audio sink: src-add error: %s (rv=%d)", strerror(errno), rv);
goto finish; goto finish;
} }
@ -610,11 +610,11 @@ static int alloc_gref(struct ioctl_gntalloc_alloc_gref *gref_, void **addr) {
*addr = mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, alloc_fd, gref_->index); *addr = mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, alloc_fd, gref_->index);
if (*addr == MAP_FAILED) { if (*addr == MAP_FAILED) {
*addr = 0; *addr = 0;
pa_log_debug("Xen audio sink: mmap'ing shared page failed\n"); pa_log_debug("Xen audio sink: mmap'ing shared page failed");
goto finish; goto finish;
} }
pa_log_debug("Xen audio sink: Got grant #%d. Mapped locally at %Ld=%p\n", pa_log_debug("Xen audio sink: Got grant #%d. Mapped locally at %Ld=%p",
gref_->gref_ids[0], (long long)gref_->index, *addr); gref_->gref_ids[0], (long long)gref_->index, *addr);
/* skip this for now /* skip this for now
@ -625,7 +625,7 @@ static int alloc_gref(struct ioctl_gntalloc_alloc_gref *gref_, void **addr) {
rv = ioctl(a_fd, IOCTL_GNTALLOC_SET_UNMAP_NOTIFY, &uarg); rv = ioctl(a_fd, IOCTL_GNTALLOC_SET_UNMAP_NOTIFY, &uarg);
if (rv) if (rv)
pa_log_debug("gntalloc unmap notify error: %s (rv=%d)\n", strerror(errno), rv); pa_log_debug("gntalloc unmap notify error: %s (rv=%d)", strerror(errno), rv);
*/ */
finish: finish:
close(alloc_fd); close(alloc_fd);

View file

@ -729,7 +729,7 @@ static int set_scheduler(int rtprio) {
/* Try to talk to RealtimeKit */ /* Try to talk to RealtimeKit */
if (!(bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error))) { if (!(bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error))) {
pa_log("Failed to connect to system bus: %s\n", error.message); pa_log("Failed to connect to system bus: %s", error.message);
dbus_error_free(&error); dbus_error_free(&error);
errno = -EIO; errno = -EIO;
return -1; return -1;
@ -746,7 +746,7 @@ static int set_scheduler(int rtprio) {
r = getrlimit(RLIMIT_RTTIME, &rl); r = getrlimit(RLIMIT_RTTIME, &rl);
if (r >= 0 && (long long) rl.rlim_max > rttime) { if (r >= 0 && (long long) rl.rlim_max > rttime) {
pa_log_info("Clamping rlimit-rttime to %lld for RealtimeKit\n", rttime); pa_log_info("Clamping rlimit-rttime to %lld for RealtimeKit", rttime);
rl.rlim_cur = rl.rlim_max = rttime; rl.rlim_cur = rl.rlim_max = rttime;
r = setrlimit(RLIMIT_RTTIME, &rl); r = setrlimit(RLIMIT_RTTIME, &rl);
@ -866,7 +866,7 @@ static int set_nice(int nice_level) {
/* Try to talk to RealtimeKit */ /* Try to talk to RealtimeKit */
if (!(bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error))) { if (!(bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error))) {
pa_log("Failed to connect to system bus: %s\n", error.message); pa_log("Failed to connect to system bus: %s", error.message);
dbus_error_free(&error); dbus_error_free(&error);
errno = -EIO; errno = -EIO;
return -1; return -1;

View file

@ -190,7 +190,7 @@ static inline size_t PA_PAGE_ALIGN(size_t l) {
#define pa_return_if_fail(expr) \ #define pa_return_if_fail(expr) \
do { \ do { \
if (PA_UNLIKELY(!(expr))) { \ if (PA_UNLIKELY(!(expr))) { \
pa_log_debug("Assertion '%s' failed at %s:%u, function %s.\n", #expr , __FILE__, __LINE__, PA_PRETTY_FUNCTION); \ pa_log_debug("Assertion '%s' failed at %s:%u, function %s.", #expr , __FILE__, __LINE__, PA_PRETTY_FUNCTION); \
return; \ return; \
} \ } \
} while(false) } while(false)
@ -198,7 +198,7 @@ static inline size_t PA_PAGE_ALIGN(size_t l) {
#define pa_return_val_if_fail(expr, val) \ #define pa_return_val_if_fail(expr, val) \
do { \ do { \
if (PA_UNLIKELY(!(expr))) { \ if (PA_UNLIKELY(!(expr))) { \
pa_log_debug("Assertion '%s' failed at %s:%u, function %s.\n", #expr , __FILE__, __LINE__, PA_PRETTY_FUNCTION); \ pa_log_debug("Assertion '%s' failed at %s:%u, function %s.", #expr , __FILE__, __LINE__, PA_PRETTY_FUNCTION); \
return (val); \ return (val); \
} \ } \
} while(false) } while(false)

View file

@ -483,7 +483,7 @@ int pa_shm_cleanup(void) {
segment_name(fn, sizeof(fn), id); segment_name(fn, sizeof(fn), id);
if (shm_unlink(fn) < 0 && errno != EACCES && errno != ENOENT) if (shm_unlink(fn) < 0 && errno != EACCES && errno != ENOENT)
pa_log_warn("Failed to remove SHM segment %s: %s\n", fn, pa_cstrerror(errno)); pa_log_warn("Failed to remove SHM segment %s: %s", fn, pa_cstrerror(errno));
} }
closedir(d); closedir(d);

View file

@ -114,7 +114,7 @@ static void run_mix_test(
for (i = 0; i < nsamples; i++) { for (i = 0; i < nsamples; i++) {
if (samples[i] != samples_ref[i]) { if (samples[i] != samples_ref[i]) {
pa_log_debug("Correctness test failed: align=%d, channels=%d", align, channels); pa_log_debug("Correctness test failed: align=%d, channels=%d", align, channels);
pa_log_debug("%d: %hd != %04hd (%hd + %hd)\n", pa_log_debug("%d: %hd != %04hd (%hd + %hd)",
i, i,
samples[i], samples_ref[i], samples[i], samples_ref[i],
samples0[i], samples1[i]); samples0[i], samples1[i]);

View file

@ -68,7 +68,7 @@ static void run_remap_test_float(
for (i = 0; i < nsamples * n_oc; i++) { for (i = 0; i < nsamples * n_oc; i++) {
if (fabsf(out[i] - out_ref[i]) > 0.0001f) { if (fabsf(out[i] - out_ref[i]) > 0.0001f) {
pa_log_debug("Correctness test failed: align=%d", align); pa_log_debug("Correctness test failed: align=%d", align);
pa_log_debug("%d: %.24f != %.24f\n", i, pa_log_debug("%d: %.24f != %.24f", i,
out[i], out_ref[i]); out[i], out_ref[i]);
ck_abort(); ck_abort();
} }
@ -122,7 +122,7 @@ static void run_remap_test_s16(
for (i = 0; i < nsamples * n_oc; i++) { for (i = 0; i < nsamples * n_oc; i++) {
if (abs(out[i] - out_ref[i]) > 3) { if (abs(out[i] - out_ref[i]) > 3) {
pa_log_debug("Correctness test failed: align=%d", align); pa_log_debug("Correctness test failed: align=%d", align);
pa_log_debug("%d: %d != %d\n", i, out[i], out_ref[i]); pa_log_debug("%d: %d != %d", i, out[i], out_ref[i]);
ck_abort(); ck_abort();
} }
} }

View file

@ -76,7 +76,7 @@ static void run_volume_test(
for (i = 0; i < nsamples; i++) { for (i = 0; i < nsamples; i++) {
if (samples[i] != samples_ref[i]) { if (samples[i] != samples_ref[i]) {
pa_log_debug("Correctness test failed: align=%d, channels=%d", align, channels); pa_log_debug("Correctness test failed: align=%d, channels=%d", align, channels);
pa_log_debug("%d: %04hx != %04hx (%04hx * %08x)\n", i, samples[i], samples_ref[i], pa_log_debug("%d: %04hx != %04hx (%04hx * %08x)", i, samples[i], samples_ref[i],
samples_orig[i], volumes[i % channels]); samples_orig[i], volumes[i % channels]);
ck_abort(); ck_abort();
} }

View file

@ -212,7 +212,7 @@ START_TEST (interpol_test) {
bool cork_now; bool cork_now;
#endif #endif
rtc = pa_timeval_diff(&now, &start); rtc = pa_timeval_diff(&now, &start);
pa_log_info("%i\t%llu\t%llu\t%llu\t%llu\t%lli\t%u\t%u\t%llu\t%llu\n", k, pa_log_info("%i\t%llu\t%llu\t%llu\t%llu\t%lli\t%u\t%u\t%llu\t%llu", k,
(unsigned long long) rtc, (unsigned long long) rtc,
(unsigned long long) t, (unsigned long long) t,
(unsigned long long) (rtc-old_rtc), (unsigned long long) (rtc-old_rtc),

View file

@ -70,7 +70,7 @@ static int compare_data_block(struct lfe_filter_test *lft, void *a, void *b) {
for (i = 0; i < ONE_BLOCK_SAMPLES; i++) { for (i = 0; i < ONE_BLOCK_SAMPLES; i++) {
if (abs(*r++ - *u++) > TOLERANT_VARIATION) { if (abs(*r++ - *u++) > TOLERANT_VARIATION) {
pa_log_error("lfe-filter-test: test failed, the output data in the position 0x%x of a block does not equal!\n", i); pa_log_error("lfe-filter-test: test failed, the output data in the position 0x%x of a block does not equal!", i);
ret = -1; ret = -1;
break; break;
} }
@ -88,7 +88,7 @@ static int lfe_filter_rewind_test(struct lfe_filter_test *lft, int rewind_sample
uint32_t fz = pa_frame_size(lft->ss); uint32_t fz = pa_frame_size(lft->ss);
if (rewind_samples > TOTAL_SAMPLES || rewind_samples < TOTAL_SAMPLES - ONE_BLOCK_SAMPLES) { if (rewind_samples > TOTAL_SAMPLES || rewind_samples < TOTAL_SAMPLES - ONE_BLOCK_SAMPLES) {
pa_log_error("lfe-filter-test: Please keep %d samples < rewind_samples < %d samples\n", TOTAL_SAMPLES - ONE_BLOCK_SAMPLES, TOTAL_SAMPLES); pa_log_error("lfe-filter-test: Please keep %d samples < rewind_samples < %d samples", TOTAL_SAMPLES - ONE_BLOCK_SAMPLES, TOTAL_SAMPLES);
return ret; return ret;
} }

View file

@ -38,11 +38,11 @@ static void nop_free_cb(void *p) {
} }
static void underflow_cb(struct pa_stream *s, void *userdata) { static void underflow_cb(struct pa_stream *s, void *userdata) {
pa_log_warn("Underflow\n"); pa_log_warn("Underflow");
} }
static void overflow_cb(struct pa_stream *s, void *userdata) { static void overflow_cb(struct pa_stream *s, void *userdata) {
pa_log_warn("Overlow\n"); pa_log_warn("Overlow");
} }
/* /*
@ -114,7 +114,7 @@ static void calibrate_read_cb(pa_stream *s, size_t nbytes, void *userdata) {
v += 0.02f; v += 0.02f;
if (v > 1.0) { if (v > 1.0) {
pa_log_error("Capture signal too weak at 100%% volume (%g). Giving up.\n", pa_rms(in, nsamp)); pa_log_error("Capture signal too weak at 100%% volume (%g). Giving up.", pa_rms(in, nsamp));
pa_assert_not_reached(); pa_assert_not_reached();
} }
@ -126,7 +126,7 @@ static void calibrate_read_cb(pa_stream *s, size_t nbytes, void *userdata) {
/* Make sure the signal strength is steadily above our threshold */ /* Make sure the signal strength is steadily above our threshold */
if (++confirm > 5) { if (++confirm > 5) {
#if 0 #if 0
pa_log_debug(stderr, "Capture volume = %g (%g)\n", v, pa_rms(in, nsamp)); pa_log_debug(stderr, "Capture volume = %g (%g)", v, pa_rms(in, nsamp));
#endif #endif
cal_state = CALIBRATION_ZERO; cal_state = CALIBRATION_ZERO;
} }
@ -138,7 +138,7 @@ static void calibrate_read_cb(pa_stream *s, size_t nbytes, void *userdata) {
/* Now make sure silence doesn't trigger a false positive because /* Now make sure silence doesn't trigger a false positive because
* of noise. */ * of noise. */
if (pa_rms(in, nsamp) > 0.1f) { if (pa_rms(in, nsamp) > 0.1f) {
fprintf(stderr, "Too much noise on capture (%g). Giving up.\n", pa_rms(in, nsamp)); pa_log_warn("Too much noise on capture (%g). Giving up.", pa_rms(in, nsamp));
pa_assert_not_reached(); pa_assert_not_reached();
} }
@ -179,7 +179,7 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
} }
if (!o) { if (!o) {
pa_log_error("Could not set stream volume: %s\n", pa_strerror(pa_context_errno(ctx->context))); pa_log_error("Could not set stream volume: %s", pa_strerror(pa_context_errno(ctx->context)));
pa_assert_not_reached(); pa_assert_not_reached();
} else } else
pa_operation_unref(o); pa_operation_unref(o);
@ -189,7 +189,7 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
case PA_STREAM_FAILED: case PA_STREAM_FAILED:
default: default:
pa_log_error("Stream error: %s\n", pa_strerror(pa_context_errno(ctx->context))); pa_log_error("Stream error: %s", pa_strerror(pa_context_errno(ctx->context)));
pa_assert_not_reached(); pa_assert_not_reached();
} }
} }
@ -252,7 +252,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
case PA_CONTEXT_FAILED: case PA_CONTEXT_FAILED:
default: default:
pa_log_error("Context error: %s\n", pa_strerror(pa_context_errno(c))); pa_log_error("Context error: %s", pa_strerror(pa_context_errno(c)));
pa_assert_not_reached(); pa_assert_not_reached();
} }
} }
@ -271,7 +271,7 @@ int pa_lo_test_init(pa_lo_test_context *ctx) {
/* Connect the context */ /* Connect the context */
if (pa_context_connect(ctx->context, NULL, PA_CONTEXT_NOFLAGS, NULL) < 0) { if (pa_context_connect(ctx->context, NULL, PA_CONTEXT_NOFLAGS, NULL) < 0) {
pa_log_error("pa_context_connect() failed.\n"); pa_log_error("pa_context_connect() failed.");
goto quit; goto quit;
} }
@ -288,7 +288,7 @@ int pa_lo_test_run(pa_lo_test_context *ctx) {
int ret; int ret;
if (pa_mainloop_run(ctx->mainloop, &ret) < 0) { if (pa_mainloop_run(ctx->mainloop, &ret) < 0) {
pa_log_error("pa_mainloop_run() failed.\n"); pa_log_error("pa_mainloop_run() failed.");
return -1; return -1;
} }

View file

@ -299,7 +299,7 @@ START_TEST (mix_test) {
pa_mix_info m[2]; pa_mix_info m[2];
void *ptr; void *ptr;
pa_log_debug("=== mixing: %s\n", pa_sample_format_to_string(a.format)); pa_log_debug("=== mixing: %s", pa_sample_format_to_string(a.format));
/* Generate block */ /* Generate block */
i.memblock = generate_block(pool, &a); i.memblock = generate_block(pool, &a);

View file

@ -59,7 +59,7 @@ int main(int argc, char *argv[]) {
pa_resampler *r; pa_resampler *r;
pa_sample_spec ss1, ss2; pa_sample_spec ss1, ss2;
pa_log_info("Converting from '%s' to '%s'.\n", pa_channel_map_snprint(a, sizeof(a), &maps[i]), pa_channel_map_snprint(b, sizeof(b), &maps[j])); pa_log_info("Converting from '%s' to '%s'.", pa_channel_map_snprint(a, sizeof(a), &maps[i]), pa_channel_map_snprint(b, sizeof(b), &maps[j]));
ss1.channels = maps[i].channels; ss1.channels = maps[i].channels;
ss2.channels = maps[j].channels; ss2.channels = maps[j].channels;

View file

@ -25,7 +25,7 @@ START_TEST (utf8_filter) {
{ {
char res1[] = { 0x68, 0x5f, 0x70, 0x66, 0x62, 0x75, 0x72, 0x67, '\0' }; char res1[] = { 0x68, 0x5f, 0x70, 0x66, 0x62, 0x75, 0x72, 0x67, '\0' };
c = pa_utf8_filter("hüpfburg"); c = pa_utf8_filter("hüpfburg");
pa_log_debug("%s %s\n", res1, c); pa_log_debug("%s %s", res1, c);
fail_unless(pa_streq(c, res1)); fail_unless(pa_streq(c, res1));
pa_xfree(c); pa_xfree(c);
} }
@ -34,14 +34,14 @@ START_TEST (utf8_filter) {
char res2[] = { 0x68, 0xc3, 0xbc, 0x70, 0x66, 0x62, 0x75, 0x72, 0x67, '\0' }; char res2[] = { 0x68, 0xc3, 0xbc, 0x70, 0x66, 0x62, 0x75, 0x72, 0x67, '\0' };
c = pa_utf8_filter("hüpfburg"); c = pa_utf8_filter("hüpfburg");
fail_unless(pa_streq(c, res2)); fail_unless(pa_streq(c, res2));
pa_log_debug("%s %s\n", res2, c); pa_log_debug("%s %s", res2, c);
pa_xfree(c); pa_xfree(c);
} }
{ {
char res3[] = { 0x5f, 0x78, 0x6b, 0x6e, 0x5f, 0x72, 0x7a, 0x6d, 0x5f, 0x72, 0x7a, 0x65, 0x6c, 0x74, 0x5f, 0x72, 0x73, 0x7a, 0xdf, 0xb3, 0x5f, 0x64, 0x73, 0x6a, 0x6b, 0x66, 0x68, '\0' }; char res3[] = { 0x5f, 0x78, 0x6b, 0x6e, 0x5f, 0x72, 0x7a, 0x6d, 0x5f, 0x72, 0x7a, 0x65, 0x6c, 0x74, 0x5f, 0x72, 0x73, 0x7a, 0xdf, 0xb3, 0x5f, 0x64, 0x73, 0x6a, 0x6b, 0x66, 0x68, '\0' };
c = pa_utf8_filter("üxknärzmörzeltörszß³§dsjkfh"); c = pa_utf8_filter("üxknärzmörzeltörszß³§dsjkfh");
pa_log_debug("%s %s\n", res3, c); pa_log_debug("%s %s", res3, c);
fail_unless(pa_streq(c, res3)); fail_unless(pa_streq(c, res3));
pa_xfree(c); pa_xfree(c);
} }