summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/aucat/aproc.c18
-rw-r--r--usr.bin/aucat/dev.c6
-rw-r--r--usr.bin/aucat/file.c4
-rw-r--r--usr.bin/aucat/headers.c4
-rw-r--r--usr.bin/aucat/sock.c4
5 files changed, 27 insertions, 9 deletions
diff --git a/usr.bin/aucat/aproc.c b/usr.bin/aucat/aproc.c
index 8bcb21abedf..246cf6ebeac 100644
--- a/usr.bin/aucat/aproc.c
+++ b/usr.bin/aucat/aproc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aproc.c,v 1.24 2008/11/16 16:30:22 ratchov Exp $ */
+/* $OpenBSD: aproc.c,v 1.25 2008/11/16 17:08:32 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -1015,11 +1015,13 @@ resamp_new(char *name, struct aparams *ipar, struct aparams *opar)
p->u.resamp.odelta = 0;
for (i = 0; i < NCHAN_MAX; i++)
p->u.resamp.ctx[i] = 0;
+#ifdef DEBUG
if (debug_level > 0) {
- DPRINTF("resamp_new: %s: ", p->name);
+ fprintf(stderr, "resamp_new: %s: ", p->name);
aparams_print2(ipar, opar);
- DPRINTF("\n");
+ fprintf(stderr, "\n");
}
+#endif
return p;
}
@@ -1140,11 +1142,13 @@ cmap_new(char *name, struct aparams *ipar, struct aparams *opar)
p = aproc_new(&cmap_ops, name);
for (i = 0; i < NCHAN_MAX; i++)
p->u.cmap.ctx[i] = 0;
+#ifdef DEBUG
if (debug_level > 0) {
- DPRINTF("cmap_new: %s: ", p->name);
+ fprintf(stderr, "cmap_new: %s: ", p->name);
aparams_print2(ipar, opar);
- DPRINTF("\n");
+ fprintf(stderr, "\n");
}
+#endif
return p;
}
@@ -1297,11 +1301,13 @@ enc_new(char *name, struct aparams *par)
p->u.conv.bnext = 1;
p->u.conv.snext = 0;
}
+#ifdef DEBUG
if (debug_level > 0) {
fprintf(stderr, "enc_new: %s: ", p->name);
aparams_print(par);
fprintf(stderr, "\n");
}
+#endif
return p;
}
@@ -1454,10 +1460,12 @@ dec_new(char *name, struct aparams *par)
p->u.conv.bnext = 1;
p->u.conv.snext = 0;
}
+#ifdef DEBUG
if (debug_level > 0) {
fprintf(stderr, "dec_new: %s: ", p->name);
aparams_print(par);
fprintf(stderr, "\n");
}
+#endif
return p;
}
diff --git a/usr.bin/aucat/dev.c b/usr.bin/aucat/dev.c
index e1d3b7ea0f8..e1548490b86 100644
--- a/usr.bin/aucat/dev.c
+++ b/usr.bin/aucat/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.18 2008/11/16 16:30:22 ratchov Exp $ */
+/* $OpenBSD: dev.c,v 1.19 2008/11/16 17:08:32 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -116,19 +116,23 @@ dev_init(char *devpath,
exit(1);
if (dipar) {
dipar->rate = dev_rate;
+#ifdef DEBUG
if (debug_level > 0) {
fprintf(stderr, "dev_init: hw recording ");
aparams_print(dipar);
fprintf(stderr, "\n");
}
+#endif
}
if (dopar) {
dopar->rate = dev_rate;
+#ifdef DEBUG
if (debug_level > 0) {
fprintf(stderr, "dev_init: hw playing ");
aparams_print(dopar);
fprintf(stderr, "\n");
}
+#endif
}
ibufsz = obufsz = dev_bufsz;
bufsz = (bufsz > dev_bufsz) ? bufsz - dev_bufsz : 0;
diff --git a/usr.bin/aucat/file.c b/usr.bin/aucat/file.c
index d2d008aa017..18da0f25d94 100644
--- a/usr.bin/aucat/file.c
+++ b/usr.bin/aucat/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.5 2008/11/16 17:01:58 ratchov Exp $ */
+/* $OpenBSD: file.c,v 1.6 2008/11/16 17:08:32 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -45,6 +45,7 @@ struct filelist file_list;
void
file_dprint(int n, struct file *f)
{
+#ifdef DEBUG
if (debug_level < n)
return;
fprintf(stderr, "%s:%s <", f->ops->name, f->name);
@@ -57,6 +58,7 @@ file_dprint(int n, struct file *f)
if (f->state & FILE_HUP)
fprintf(stderr, "HUP");
fprintf(stderr, ">");
+#endif
}
struct file *
diff --git a/usr.bin/aucat/headers.c b/usr.bin/aucat/headers.c
index 4795c47ee7a..25bb23e9477 100644
--- a/usr.bin/aucat/headers.c
+++ b/usr.bin/aucat/headers.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: headers.c,v 1.2 2008/10/26 08:49:44 ratchov Exp $ */
+/* $OpenBSD: headers.c,v 1.3 2008/11/16 17:08:32 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -97,11 +97,13 @@ wav_readfmt(int fd, unsigned csize, struct aparams *par)
par->msb = 1;
par->cmax = cmax;
par->rate = rate;
+#ifdef DEBUG
if (debug_level > 0) {
fprintf(stderr, "wav_readfmt: using ");
aparams_print(par);
fprintf(stderr, "\n");
}
+#endif
return 1;
}
diff --git a/usr.bin/aucat/sock.c b/usr.bin/aucat/sock.c
index 50d0fe398a5..06d32b69017 100644
--- a/usr.bin/aucat/sock.c
+++ b/usr.bin/aucat/sock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sock.c,v 1.4 2008/11/16 16:30:22 ratchov Exp $ */
+/* $OpenBSD: sock.c,v 1.5 2008/11/16 17:08:32 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -662,6 +662,7 @@ sock_setpar(struct sock *f)
f->bufsz -= f->bufsz % f->round;
DPRINTF("sock_setpar: bufsz -> %u\n", f->bufsz);
}
+#ifdef DEBUG
if (debug_level > 0) {
fprintf(stderr, "sock_setpar: %p: rpar=", f);
aparams_print(&f->rpar);
@@ -669,6 +670,7 @@ sock_setpar(struct sock *f)
aparams_print(&f->wpar);
fprintf(stderr, ", mode=%u, bufsz=%u\n", f->mode, f->bufsz);
}
+#endif
return 1;
}