From f3e7e4d1bc0b47e94e1abdb5287ed44b1fa97d57 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 16 May 2001 18:57:54 +0000 Subject: [PATCH] fix device openning mode. defaults to write only, but read/write can be selected using -sndrw --- source/snd_oss.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/snd_oss.c b/source/snd_oss.c index 61e80df..f1acf4c 100644 --- a/source/snd_oss.c +++ b/source/snd_oss.c @@ -80,11 +80,14 @@ SNDDMA_Init (void) struct audio_buf_info info; int caps; int retries = 3; + int omode = O_WRONLY; snd_inited = 0; // open /dev/dsp, confirm capability to mmap, and get size of dma buffer - audio_fd = open ("/dev/dsp", O_RDWR); + if (COM_CheckParm ("-sndrw")) + omode = O_RDWR; + audio_fd = open ("/dev/dsp", omode); if (audio_fd < 0) { // Failed open, retry up to 3 times // if it's busy while ((audio_fd < 0) && retries-- &&