diff options
author | 2008-04-04 05:03:19 +0000 | |
---|---|---|
committer | 2008-04-04 05:03:19 +0000 | |
commit | 0ac7d629f4fc29a9741a8666eba714dfadfa2d57 (patch) | |
tree | 2599d9fd32211e0b4b4a0dd21aa07912b72f2185 | |
parent | if full-duplex is being turned on, also set the oprtational mode to (diff) | |
download | wireguard-openbsd-0ac7d629f4fc29a9741a8666eba714dfadfa2d57.tar.xz wireguard-openbsd-0ac7d629f4fc29a9741a8666eba714dfadfa2d57.zip |
simplify SNDCTL_DSP_SETTRIGGER
- don't mess with the operational mode. that was primarily to be able to
set record|play mode for full-duplex, which isn't needed any more.
- don't set pause=1. this ioctl isn't supposed to be used for stopping
streams.
suggestions, ok ratchov
-rw-r--r-- | lib/libossaudio/ossaudio.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/libossaudio/ossaudio.c b/lib/libossaudio/ossaudio.c index cecc951d3ba..5a9970be17e 100644 --- a/lib/libossaudio/ossaudio.c +++ b/lib/libossaudio/ossaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ossaudio.c,v 1.14 2007/11/12 05:43:59 jakemsr Exp $ */ +/* $OpenBSD: ossaudio.c,v 1.15 2008/04/04 05:03:19 jakemsr Exp $ */ /* $NetBSD: ossaudio.c,v 1.14 2001/05/10 01:53:48 augustss Exp $ */ /*- @@ -404,17 +404,10 @@ audio_ioctl(int fd, unsigned long com, void *argp) case SNDCTL_DSP_SETTRIGGER: idat = INTARG; AUDIO_INITINFO(&tmpinfo); - tmpinfo.mode = 0; - if (idat & PCM_ENABLE_OUTPUT) { - tmpinfo.mode |= (AUMODE_PLAY | AUMODE_PLAY_ALL); + if (idat & PCM_ENABLE_OUTPUT) tmpinfo.play.pause = 0; - } else - tmpinfo.play.pause = 1; - if (idat & PCM_ENABLE_INPUT) { - tmpinfo.mode |= AUMODE_RECORD; + if (idat & PCM_ENABLE_INPUT) tmpinfo.record.pause = 0; - } else - tmpinfo.record.pause = 1; retval = ioctl(fd, AUDIO_SETINFO, &tmpinfo); rerr = errno; /* FALLTHRU */ |