summaryrefslogtreecommitdiff
path: root/audio/xmmix/patches
diff options
context:
space:
mode:
Diffstat (limited to 'audio/xmmix/patches')
-rw-r--r--audio/xmmix/patches/patch-aa117
-rw-r--r--audio/xmmix/patches/patch-ab112
-rw-r--r--audio/xmmix/patches/patch-ac58
3 files changed, 171 insertions, 116 deletions
diff --git a/audio/xmmix/patches/patch-aa b/audio/xmmix/patches/patch-aa
index 0e320967efa..7bf78d21605 100644
--- a/audio/xmmix/patches/patch-aa
+++ b/audio/xmmix/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.4 1998/08/07 10:36:22 agc Exp $
+$NetBSD: patch-aa,v 1.5 2000/09/19 11:09:21 fredb Exp $
--- ../xmmix-1.2/Imakefile Sun Jul 14 19:48:56 1996
+++ ./Imakefile Fri Oct 24 23:34:17 1997
@@ -38,83 +38,6 @@ $NetBSD: patch-aa,v 1.4 1998/08/07 10:36:22 agc Exp $
/* Initialize screen controls */
mx_start(&widgets);
---- ../xmmix-1.2/mixer.c Thu Nov 7 17:00:26 1996
-+++ ./mixer.c Mon Aug 11 23:20:15 1997
-@@ -104,6 +104,14 @@
- ***********************/
-
-
-+#ifdef __NetBSD__
-+void
-+mxchg(int sig)
-+{
-+ deliverSIGIO();
-+}
-+#endif
-+
- /*
- * do_ioctl
- * Perform ioctl command. If file is not yet open or if we
-@@ -681,11 +689,13 @@
- /* Query sound driver version */
- if ((fp = fopen("/dev/sndstat", "r")) == NULL) {
- if (!app_data.demo) {
-+#ifndef __NetBSD__
- fprintf(errfp, "%s: %s: %s\n",
- PROGNAME,
- "Cannot open /dev/sndstat",
- "assuming pre-3.0 sound driver.");
- maxdevs = MAXDEVS_V2;
-+#endif
- }
- return;
- }
-@@ -915,6 +925,7 @@
- mx_start(widgets_t *m)
- {
- char msg[256];
-+ int one = 1;
-
- if (app_data.autoload != NULL && app_data.autoload[0] != '\0' &&
- strcmp(app_data.autoload, "/dev/null") != 0) {
-@@ -930,6 +941,14 @@
- }
- }
-
-+#if defined(__NetBSD__)
-+ signal(SIGIO, mxchg);
-+ ioctl(dev_fd, FIOASYNC, &one);
-+#endif
-+
-+ /* Query hardware mixer settings */
-+ mx_queryhw(&widgets);
-+
- /* Update screen controls to match current status */
- mx_updctl(m);
- }
-@@ -1531,6 +1550,22 @@
- if (p->reason != XmCR_FOCUS || form == (Widget) NULL)
- return;
-
-+ /* Query hardware mixer settings */
-+ mx_queryhw(&widgets);
-+
-+ /* Update screen controls */
-+ mx_updctl(&widgets);
-+}
-+
-+
-+/*
-+ * mx_change
-+ * Mixer device has changed
-+ */
-+/*ARGSUSED*/
-+void
-+mx_change(XtPointer client_data)
-+{
- /* Query hardware mixer settings */
- mx_queryhw(&widgets);
-
--- ../xmmix-1.2/mixer.h Sun Jul 14 19:49:04 1996
+++ ./mixer.h Mon Aug 11 23:19:17 1997
@@ -78,6 +78,7 @@
@@ -125,44 +48,6 @@ $NetBSD: patch-aa,v 1.4 1998/08/07 10:36:22 agc Exp $
#endif /* __MIXER_H__ */
---- ../xmmix-1.2/widget.c Sun Jul 14 19:49:09 1996
-+++ ./widget.c Sat Oct 25 00:24:43 1997
-@@ -973,6 +973,10 @@
- delw = XmInternAtom(display, "WM_DELETE_WINDOW", False);
- }
-
-+static XtSignalId sigid;
-+void deliverSIGIO() {
-+ XtNoticeSignal(sigid);
-+}
-
- /*
- * register_callbacks
-@@ -985,7 +989,7 @@
- * Nothing
- */
- void
--register_callbacks(widgets_t *m)
-+register_callbacks(widgets_t *m, XtAppContext app)
- {
- int i;
-
-@@ -1126,6 +1130,15 @@
- XmNfocusCallback,
- (XtCallbackProc) mx_focuschg, (XtPointer) m->form
- );
-+
-+#ifdef __NetBSD__
-+ /*
-+ * Mixer SIGIO change callback
-+ */
-+ sigid = XtAppAddSignal(app,
-+ (XtSignalCallbackProc) mx_change, (XtPointer) 0
-+ );
-+#endif
-
- /*
- * Install WM_DELETE_WINDOW handler
--- ../xmmix-1.2/widget.h Sun Jul 14 19:49:10 1996
+++ ./widget.h Mon Aug 11 23:13:43 1997
@@ -119,7 +119,7 @@
diff --git a/audio/xmmix/patches/patch-ab b/audio/xmmix/patches/patch-ab
new file mode 100644
index 00000000000..d3d2a86074e
--- /dev/null
+++ b/audio/xmmix/patches/patch-ab
@@ -0,0 +1,112 @@
+$NetBSD: patch-ab,v 1.1 2000/09/19 11:09:21 fredb Exp $
+
+--- mixer.c.orig Thu Nov 7 10:00:26 1996
++++ mixer.c Wed Sep 13 22:46:35 2000
+@@ -104,6 +104,14 @@
+ ***********************/
+
+
++#ifdef __NetBSD__
++void
++mxchg(int sig)
++{
++ deliverSIGIO();
++}
++#endif
++
+ /*
+ * do_ioctl
+ * Perform ioctl command. If file is not yet open or if we
+@@ -201,12 +209,17 @@
+ ctlinfo.slinfo[i].right = ((level >> 8) & 0xff);
+
+ /* Sanity check */
+- if (ctlinfo.slinfo[i].left > 100)
+- ctlinfo.slinfo[i].left = 100;
++#ifdef __NetBSD__
++# define SLIDER_MAX 255
++#else
++# define SLIDER_MAX 100
++#endif
++ if (ctlinfo.slinfo[i].left > SLIDER_MAX)
++ ctlinfo.slinfo[i].left = SLIDER_MAX;
+ else if (ctlinfo.slinfo[i].left < 0)
+ ctlinfo.slinfo[i].left = 0;
+- if (ctlinfo.slinfo[i].right > 100)
+- ctlinfo.slinfo[i].right = 100;
++ if (ctlinfo.slinfo[i].right > SLIDER_MAX)
++ ctlinfo.slinfo[i].right = SLIDER_MAX;
+ else if (ctlinfo.slinfo[i].right < 0)
+ ctlinfo.slinfo[i].right = 0;
+
+@@ -674,18 +687,24 @@
+ }
+
+ /* Set maximum number of devices supported */
++#ifdef __NetBSD__
++ maxdevs = SOUND_MIXER_NRDEVICES;
++#else
+ maxdevs = MAXDEVS_V3;
++#endif
+
+ strcpy(drv_ver, "unknown");
+
+ /* Query sound driver version */
+ if ((fp = fopen("/dev/sndstat", "r")) == NULL) {
+ if (!app_data.demo) {
++#ifndef __NetBSD__
+ fprintf(errfp, "%s: %s: %s\n",
+ PROGNAME,
+ "Cannot open /dev/sndstat",
+ "assuming pre-3.0 sound driver.");
+ maxdevs = MAXDEVS_V2;
++#endif
+ }
+ return;
+ }
+@@ -915,6 +934,7 @@
+ mx_start(widgets_t *m)
+ {
+ char msg[256];
++ int one = 1;
+
+ if (app_data.autoload != NULL && app_data.autoload[0] != '\0' &&
+ strcmp(app_data.autoload, "/dev/null") != 0) {
+@@ -930,6 +950,14 @@
+ }
+ }
+
++#if defined(__NetBSD__)
++ signal(SIGIO, mxchg);
++ ioctl(dev_fd, FIOASYNC, &one);
++#endif
++
++ /* Query hardware mixer settings */
++ mx_queryhw(&widgets);
++
+ /* Update screen controls to match current status */
+ mx_updctl(m);
+ }
+@@ -1531,6 +1559,22 @@
+ if (p->reason != XmCR_FOCUS || form == (Widget) NULL)
+ return;
+
++ /* Query hardware mixer settings */
++ mx_queryhw(&widgets);
++
++ /* Update screen controls */
++ mx_updctl(&widgets);
++}
++
++
++/*
++ * mx_change
++ * Mixer device has changed
++ */
++/*ARGSUSED*/
++void
++mx_change(XtPointer client_data)
++{
+ /* Query hardware mixer settings */
+ mx_queryhw(&widgets);
+
diff --git a/audio/xmmix/patches/patch-ac b/audio/xmmix/patches/patch-ac
new file mode 100644
index 00000000000..a6f1b722ad2
--- /dev/null
+++ b/audio/xmmix/patches/patch-ac
@@ -0,0 +1,58 @@
+$NetBSD: patch-ac,v 1.1 2000/09/19 11:09:21 fredb Exp $
+
+--- widget.c.orig Sun Jul 14 12:49:09 1996
++++ widget.c Mon Sep 18 17:36:06 2000
+@@ -268,7 +268,7 @@
+
+ if (pd->btip[i].acc != NULL) {
+ xs_acc = XmStringCreateSimple(pd->btip[i].acc);
+- XtSetArg(arg[n], XmNaccelerator, xs_acc); n++;
++ XtSetArg(arg[n], XmNaccelerators, xs_acc); n++;
+ }
+
+ if (pd->btip[i].mne != NULL) {
+@@ -298,7 +298,7 @@
+ }
+ if (pd->acc != NULL) {
+ xs_acc = XmStringCreateSimple(pd->acc);
+- XtSetArg(arg[n], XmNaccelerator, xs_acc); n++;
++ XtSetArg(arg[n], XmNaccelerators, xs_acc); n++;
+ }
+ if (pd->mne != NULL) {
+ XtSetArg(arg[n], XmNmnemonic, XStringToKeysym(pd->mne)); n++;
+@@ -973,6 +973,10 @@
+ delw = XmInternAtom(display, "WM_DELETE_WINDOW", False);
+ }
+
++static XtSignalId sigid;
++void deliverSIGIO() {
++ XtNoticeSignal(sigid);
++}
+
+ /*
+ * register_callbacks
+@@ -985,7 +989,7 @@
+ * Nothing
+ */
+ void
+-register_callbacks(widgets_t *m)
++register_callbacks(widgets_t *m, XtAppContext app)
+ {
+ int i;
+
+@@ -1126,6 +1130,15 @@
+ XmNfocusCallback,
+ (XtCallbackProc) mx_focuschg, (XtPointer) m->form
+ );
++
++#ifdef __NetBSD__
++ /*
++ * Mixer SIGIO change callback
++ */
++ sigid = XtAppAddSignal(app,
++ (XtSignalCallbackProc) mx_change, (XtPointer) 0
++ );
++#endif
+
+ /*
+ * Install WM_DELETE_WINDOW handler