summaryrefslogtreecommitdiff
path: root/audio/gmodplay/patches/patch-ae
diff options
context:
space:
mode:
Diffstat (limited to 'audio/gmodplay/patches/patch-ae')
-rw-r--r--audio/gmodplay/patches/patch-ae146
1 files changed, 146 insertions, 0 deletions
diff --git a/audio/gmodplay/patches/patch-ae b/audio/gmodplay/patches/patch-ae
new file mode 100644
index 00000000000..8f2da2780da
--- /dev/null
+++ b/audio/gmodplay/patches/patch-ae
@@ -0,0 +1,146 @@
+$NetBSD: patch-ae,v 1.1.1.1 2001/03/19 19:35:52 wiz Exp $
+
+--- common/modplay.cpp.orig Mon Oct 5 01:29:52 1998
++++ common/modplay.cpp Sun Jan 28 14:01:34 2001
+@@ -14,8 +14,9 @@
+ #include <fcntl.h>
+ #include <math.h>
+ #include <sys/ioctl.h>
+-#include <sys/soundcard.h>
++#include <soundcard.h>
+ #include <string.h>
++#include <libgen.h>
+
+ #include "stdafx.h"
+ #include "sndfile.h"
+@@ -88,9 +89,9 @@
+ }
+ else {
+ int val = Player->stereo?1:0;
+- ioctl(Player->dsp.fd, SNDCTL_DSP_POST);
++ ioctl(Player->dsp.fd, SNDCTL_DSP_POST, NULL);
+ ioctl(Player->dsp.fd, SNDCTL_DSP_STEREO, &val);
+- ioctl(Player->dsp.fd, SNDCTL_DSP_RESET);
++ ioctl(Player->dsp.fd, SNDCTL_DSP_RESET, NULL);
+ }
+
+ bufsize = (TIMELEN * Player->dsp.sample_rate) / 1000;
+@@ -127,8 +128,8 @@
+ Player->paused = true;
+ /* FIXME: Useless when doing a close(dsp)??
+ if (!Player->stopped) {
+- ioctl(Player->dsp.fd, SNDCTL_DSP_SYNC);
+- ioctl(Player->dsp.fd, SNDCTL_DSP_RESET);
++ ioctl(Player->dsp.fd, SNDCTL_DSP_SYNC, NULL);
++ ioctl(Player->dsp.fd, SNDCTL_DSP_RESET, NULL);
+ }
+ */
+ if (Player->buffer) {
+@@ -143,8 +144,8 @@
+ {
+ if (Player->stopped)
+ return 0;
+- ioctl(Player->dsp.fd, SNDCTL_DSP_SYNC);
+- ioctl(Player->dsp.fd, SNDCTL_DSP_RESET);
++ ioctl(Player->dsp.fd, SNDCTL_DSP_SYNC, NULL);
++ ioctl(Player->dsp.fd, SNDCTL_DSP_RESET, NULL);
+ if (Player->buffer) {
+ delete Player->buffer;
+ Player->buffer = NULL;
+@@ -330,6 +331,14 @@
+ printf(" -n, --nospectrum don't display spectrum\n");
+ printf(" -x disable X11 interface\n");
+ printf(" -v, --version output version information and exit\n");
++ printf(" -s, --surround surround sound on\n");
++ printf(" -o, --oversamp oversampling on\n");
++ printf(" -r, --reverb reverb on\n");
++ printf(" -b, --megabass megabass on\n");
++ printf(" -g, --volramp gain control on\n");
++ printf(" -f, --filter noise reduction on\n");
++ printf(" -w, --rawdump dump to output.raw\n");
++
+ }
+
+ void
+@@ -370,11 +379,55 @@
+ Player->updatespectro = false;
+ continue;
+ }
++ if (strcmp(Args[i], "-s") == 0 ||
++ strcmp(Args[i], "--surround") == 0)
++ {
++ Player->surround = true;
++ continue;
++ }
++ if (strcmp(Args[i], "-o") == 0 ||
++ strcmp(Args[i], "--oversamp") == 0)
++ {
++ Player->oversamp = true;
++ continue;
++ }
++ if (strcmp(Args[i], "-r") == 0 ||
++ strcmp(Args[i], "--reverb") == 0)
++ {
++ Player->reverb = true;
++ continue;
++ }
++ if (strcmp(Args[i], "-b") == 0 ||
++ strcmp(Args[i], "--megabass") == 0)
++ {
++ Player->megabass = true;
++ continue;
++ }
++ if (strcmp(Args[i], "-g") == 0 ||
++ strcmp(Args[i], "--gain") == 0)
++ {
++ Player->nr = true;
++ continue;
++ }
++ if (strcmp(Args[i], "-f") == 0 ||
++ strcmp(Args[i], "--filter") == 0)
++ {
++ Player->volramp = true;
++ continue;
++ }
+ if (strcmp(Args[i], "-d") == 0 || strcmp(Args[i], "--device") == 0) {
+ /* FIXME: Test if Args[i+1] starts with - */
+ Player->dsp.name = Args[1+i++];
+ continue;
+ }
++ if (strcmp(Args[i], "-w") == 0 ||
++ strcmp(Args[i], "--rawdump") == 0)
++ {
++ Player->dsp.rawdump = true;
++ Player->dsp.name = (char *)malloc(11);
++ strcpy(Player->dsp.name, "output.raw");
++ continue;
++ }
+ if (strcmp(Args[i], "--") == 0) {
+ more_params = false;
+ continue;
+@@ -413,18 +466,19 @@
+
+ Player->dsp.name = NULL;
+ Player->dsp.fd = -1;
++ Player->dsp.rawdump = false;
+
+ Player->stereo = true;
+ Player->updatespectro = true;
+ Player->repeat = false;
+ Player->paused = false;
+ Player->stopped = true;
+- Player->surround = true;
+- Player->oversamp = true;
+- Player->reverb = true;
+- Player->megabass = true;
+- Player->nr = false;
+- Player->volramp = true;
++ Player->surround = false;
++ Player->oversamp = false;
++ Player->reverb = false;
++ Player->megabass = false;
++ Player->nr = true;
++ Player->volramp = false;
+
+
+ if ((Player->playlist = CreatePlayList("default")) == NULL) {