diff options
Diffstat (limited to 'audio/gmodplay/patches/patch-ac')
-rw-r--r-- | audio/gmodplay/patches/patch-ac | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/audio/gmodplay/patches/patch-ac b/audio/gmodplay/patches/patch-ac new file mode 100644 index 00000000000..3076444f8b6 --- /dev/null +++ b/audio/gmodplay/patches/patch-ac @@ -0,0 +1,50 @@ +$NetBSD: patch-ac,v 1.1.1.1 2001/03/19 19:35:52 wiz Exp $ + +--- common/devices.cpp.orig Mon Sep 28 14:59:27 1998 ++++ common/devices.cpp Sun Jan 28 14:22:54 2001 +@@ -14,7 +14,7 @@ + #include <fcntl.h> + #include <stdio.h> + #include <sys/ioctl.h> +-#include <sys/soundcard.h> ++#include <soundcard.h> + + #include "modplay.h" + +@@ -24,13 +24,26 @@ + int val; + + //DSP->fd = open(AUDIO_DEV, O_WRONLY|O_NONBLOCK); +- DSP->fd = open(DSP->name?DSP->name:AUDIO_DEV, O_WRONLY); ++ //DSP->fd = open(DSP->name?DSP->name:AUDIO_DEV, O_WRONLY); ++ if (DSP->rawdump) { ++ DSP->fd = open(DSP->name, O_WRONLY|O_CREAT); ++ } else { ++ DSP->fd = open(DSP->name?DSP->name:AUDIO_DEV, O_WRONLY); ++ } ++ + if (DSP->fd == -1) { + return -1; + } + + val = SND_FORMAT; + dsp_format: ++ if (DSP->rawdump) { ++ DSP->snd_format = SND_FORMAT; ++ DSP->bits_per_sample = 16; ++ DSP->stereo_support = 1; ++ DSP->sample_rate = DEFAULT_RATE; ++ return 0; ++ } + if (ioctl(DSP->fd, SNDCTL_DSP_SETFMT, &val) == -1) { + perror("ioctl SNDCTL_DSP_SETFMT failed"); + exit(-1); +@@ -76,7 +89,7 @@ + } + DSP->sample_rate = val; + +- ioctl(DSP->fd, SNDCTL_DSP_RESET); ++ ioctl(DSP->fd, SNDCTL_DSP_RESET, NULL); + return 0; + } + |