diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2008-04-04 05:03:20 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2008-04-04 05:03:20 +0000 |
commit | a259b882a0b8682eee0ff7d19ff36ef536869f18 (patch) | |
tree | c4b46b7ff0b65e6f11143376766fd30e6b01ac7a /lib/libossaudio | |
parent | 49a2d4e7e49d178ce6353cc862d684fee32c3ce4 (diff) |
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
Diffstat (limited to 'lib/libossaudio')
-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 */ |