diff options
author | 2010-05-04 19:35:20 +0000 | |
---|---|---|
committer | 2010-05-04 19:35:20 +0000 | |
commit | 7de97f189912780a2f2f136520fa49e84a020511 (patch) | |
tree | 27426ddca59c6f51d14dbaaa7e828ecaccd751e4 | |
parent | fix .asm handling on powerpc and unify with alpha; ok drahn@ (diff) | |
download | wireguard-openbsd-7de97f189912780a2f2f136520fa49e84a020511.tar.xz wireguard-openbsd-7de97f189912780a2f2f136520fa49e84a020511.zip |
if the ``device'' is in loopback mode (ie no audio device), then
disable overruns/underruns since aucat must pause when an input or
an output blocks. This is a theoretical fix, since the
start/stop code is never reached in loopback mode
-rw-r--r-- | usr.bin/aucat/dev.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.bin/aucat/dev.c b/usr.bin/aucat/dev.c index fbcb42cb637..4d7a5ffd0ee 100644 --- a/usr.bin/aucat/dev.c +++ b/usr.bin/aucat/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.51 2010/05/02 11:54:26 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.52 2010/05/04 19:35:20 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -585,6 +585,8 @@ dev_start(void) dbg_puts("starting device\n"); #endif dev_pstate = DEV_RUN; + if (dev_mode & MODE_LOOP) + return; if (APROC_OK(dev_mix)) dev_mix->flags |= APROC_DROP; if (APROC_OK(dev_sub)) @@ -609,7 +611,13 @@ dev_stop(void) { struct file *f; +#ifdef DEBUG + if (debug_level >= 2) + dbg_puts("stopping stopped\n"); +#endif dev_pstate = DEV_INIT; + if (dev_mode & MODE_LOOP) + return; if (APROC_OK(dev_play) && dev_play->u.io.file) { f = dev_play->u.io.file; f->ops->stop(f); @@ -623,10 +631,6 @@ dev_stop(void) dev_sub->flags &= ~APROC_DROP; if (APROC_OK(dev_submon)) dev_submon->flags &= ~APROC_DROP; -#ifdef DEBUG - if (debug_level >= 2) - dbg_puts("device stopped\n"); -#endif } int |