diff options
author | Will Andrews <will@FreeBSD.org> | 2001-04-07 04:43:40 +0000 |
---|---|---|
committer | Will Andrews <will@FreeBSD.org> | 2001-04-07 04:43:40 +0000 |
commit | f647d198ec381670ca7ef9f3513b75d747b95f14 (patch) | |
tree | 096c6126d62fbd29f38a5723f2e36924c779d9f7 /audio/wmix | |
parent | 42dd5bff2cfad66d47deb7e2341c98381937e6a5 (diff) | |
download | ports-f647d198ec381670ca7ef9f3513b75d747b95f14.tar.gz ports-f647d198ec381670ca7ef9f3513b75d747b95f14.zip |
Notes
Diffstat (limited to 'audio/wmix')
-rw-r--r-- | audio/wmix/Makefile | 25 | ||||
-rw-r--r-- | audio/wmix/distinfo | 1 | ||||
-rw-r--r-- | audio/wmix/files/patch-aa | 34 | ||||
-rw-r--r-- | audio/wmix/files/patch-ab | 148 | ||||
-rw-r--r-- | audio/wmix/files/patch-ac | 29 | ||||
-rw-r--r-- | audio/wmix/pkg-comment | 1 | ||||
-rw-r--r-- | audio/wmix/pkg-descr | 10 | ||||
-rw-r--r-- | audio/wmix/pkg-plist | 1 |
8 files changed, 249 insertions, 0 deletions
diff --git a/audio/wmix/Makefile b/audio/wmix/Makefile new file mode 100644 index 000000000000..acc4c5aef6f8 --- /dev/null +++ b/audio/wmix/Makefile @@ -0,0 +1,25 @@ +# New ports collection makefile for: wmix +# Date created: 2 April 2001 +# Whom: Konstantinos Konstantinidis <kkonstan@daemon.gr> +# +# $FreeBSD$ +# + +PORTNAME= wmix +PORTVERSION= 2.2 +CATEGORIES= audio windowmaker +MASTER_SITES= http://www.ne.jp/asahi/linux/timecop/ +DISTNAME= ${PORTNAME}-${PORTVERSION}-oss + +MAINTAINER= kkonstan@daemon.gr + +USE_XPM= YES +USE_X_PREFIX= YES + +pre-configure: + ${PERL} -pi -e "s@cc@${CC}@g" ${WRKSRC}/Makefile + +do-install: + @${INSTALL_PROGRAM} ${WRKSRC}/wmix ${PREFIX}/bin + +.include <bsd.port.mk> diff --git a/audio/wmix/distinfo b/audio/wmix/distinfo new file mode 100644 index 000000000000..649ee4d689ab --- /dev/null +++ b/audio/wmix/distinfo @@ -0,0 +1 @@ +MD5 (wmix-2.2-oss.tar.gz) = d8f7a51e0130c89e168631e2504477cb diff --git a/audio/wmix/files/patch-aa b/audio/wmix/files/patch-aa new file mode 100644 index 000000000000..fa6f73a3a0ef --- /dev/null +++ b/audio/wmix/files/patch-aa @@ -0,0 +1,34 @@ +*** Makefile.orig Fri Mar 30 00:49:38 2001 +--- Makefile Sun Apr 1 22:50:23 2001 +*************** +*** 1,6 **** +! CC = gcc +! CFLAGS = -O2 -Wall -I/usr/X11R6/include -DCUSTOM +! LIBS = -L/usr/X11R6/lib -lX11 -lXpm -lXext + + SRCS = mix.c config.c + OBJS = mix.o config.o +--- 1,6 ---- +! CC = cc +! CFLAGS += -Wall -I/usr/local/include -I/usr/X11R6/include -DCUSTOM +! LDFLAGS+= -L/usr/local/lib -L/usr/X11R6/lib -lX11 -lXpm -lXext + + SRCS = mix.c config.c + OBJS = mix.o config.o +*************** +*** 8,14 **** + all: mixer + + mixer: $(OBJS) +! $(CC) $(CFLAGS) -o wmix $(OBJS) $(LIBS) + + clean: + rm -f *.o *~ wmix trace +--- 8,14 ---- + all: mixer + + mixer: $(OBJS) +! $(CC) $(CFLAGS) $(LDFLAGS) -o wmix $(OBJS) + + clean: + rm -f *.o *~ wmix trace diff --git a/audio/wmix/files/patch-ab b/audio/wmix/files/patch-ab new file mode 100644 index 000000000000..ded9cbded959 --- /dev/null +++ b/audio/wmix/files/patch-ab @@ -0,0 +1,148 @@ +*** mix.c.orig Fri Mar 30 00:38:55 2001 +--- mix.c Sun Apr 1 22:54:26 2001 +*************** +*** 20,26 **** +--- 20,30 ---- + #include <stdlib.h> + #include <string.h> + #include <ctype.h> ++ #ifdef __FreeBSD__ ++ #include <popt.h> ++ #else + #include <getopt.h> ++ #endif + #include <time.h> + #include <unistd.h> + #include <fcntl.h> +*************** +*** 887,899 **** + #ifdef CUSTOM + #undef SOUND_DEVICE_NAMES + +! #define SOUND_DEVICE_NAMES {"Master Volume", "Bass", "Treble", "FM Synth Volume", "PCM - Wave Volume", "PC Speaker", "Line In Level", \ +! "Microphone Level", "CD Input Volume", "Mixer Level", "PCM2 - Wave Volume", "Recording Volume", "Input Gain", "Output Gain", \ +! "Line1 Input", "Line2 Input", "Line3 Input", "Digital 1", "Digital 2", "Digital 3", \ +! "Phone Input", "Phone Output", "Video Card Volume", "Radio Card volume", "Monitor Volume"} + #endif + char *names[] = SOUND_DEVICE_NAMES; + struct mixer_info mixer_info; + + if ((mixer_fd = open(value("mixerdev"), O_RDWR)) == -1) { + printf("error: cannot open mixer device %s\n", value("mixerdev")); +--- 891,905 ---- + #ifdef CUSTOM + #undef SOUND_DEVICE_NAMES + +! #define SOUND_DEVICE_NAMES {" Master Volume", " Bass", " Treble", " Synth Volume", " Wave Volume", " PC Speaker", " Line In Level", \ +! " Microphone Level", " CD Volume", " Mixer Level", " Wave 2 Volume", " Recording Volume", " Input Gain", " Output Gain", \ +! " Line1 Input", " Line2 Input", " Line3 Input", " Digital 1", " Digital 2", " Digital 3", \ +! " Phone Input", " Phone Output", " Video Card Volume", " Radio Card Volume", " Monitor Volume"} + #endif + char *names[] = SOUND_DEVICE_NAMES; ++ #ifndef __FreeBSD__ + struct mixer_info mixer_info; ++ #endif + + if ((mixer_fd = open(value("mixerdev"), O_RDWR)) == -1) { + printf("error: cannot open mixer device %s\n", value("mixerdev")); +*************** +*** 921,932 **** + exit(1); + } + + if (ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info) == -1) { + printf("error: cannot get mixer info off mixer\n"); + exit(1); + } +- + printf("%s (%s) [", mixer_info.name, mixer_info.id); + for (count = 0; count < SOUND_MIXER_NRDEVICES; count++) { + if ((1 << count) & devmask) { + strcpy(mixer[nchannels].name, names[count]); +--- 927,942 ---- + exit(1); + } + ++ #ifdef __FreeBSD__ ++ printf("["); ++ #else + if (ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info) == -1) { + printf("error: cannot get mixer info off mixer\n"); + exit(1); + } + printf("%s (%s) [", mixer_info.name, mixer_info.id); ++ #endif ++ + for (count = 0; count < SOUND_MIXER_NRDEVICES; count++) { + if ((1 << count) & devmask) { + strcpy(mixer[nchannels].name, names[count]); +*************** +*** 946,951 **** +--- 956,962 ---- + printf("0"); + } + } ++ + printf("]\n"); + } + +*************** +*** 953,971 **** + { + int i; + int left, right, foo; + int retry = 3; + int stat = 1; + struct mixer_info mixer_info; + static int modify_counter; +- static Mixer old_mix[SOUND_MIXER_NRDEVICES]; + + /* check for possible failure here - happens with older kernels */ + if (ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info)) { + while (retry-- && stat) + stat = ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info); + } + +! if (mixer_info.modify_counter != modify_counter) { + i = 0; + /* this happens if mixer was changed by another program, + * so we need to update the values. We do not know, under OSS, +--- 964,989 ---- + { + int i; + int left, right, foo; ++ char doupdate = 0; ++ static Mixer old_mix[SOUND_MIXER_NRDEVICES]; ++ #ifndef __FreeBSD__ + int retry = 3; + int stat = 1; + struct mixer_info mixer_info; + static int modify_counter; + + /* check for possible failure here - happens with older kernels */ + if (ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info)) { + while (retry-- && stat) + stat = ioctl(mixer_fd, SOUND_MIXER_INFO, &mixer_info); + } ++ doupdate = mixer_info.modify_counter != modify_counter; ++ #else ++ /* clearly something better would be nice, but hey, it works! */ ++ doupdate = 1; ++ #endif + +! if (doupdate) { + i = 0; + /* this happens if mixer was changed by another program, + * so we need to update the values. We do not know, under OSS, +*************** +*** 1022,1028 **** +--- 1040,1048 ---- + } + } + } ++ #ifndef __FreeBSD__ + modify_counter = mixer_info.modify_counter; ++ #endif + memcpy(old_mix, mixer, sizeof(mixer)); + } + diff --git a/audio/wmix/files/patch-ac b/audio/wmix/files/patch-ac new file mode 100644 index 000000000000..ef03fe07ceff --- /dev/null +++ b/audio/wmix/files/patch-ac @@ -0,0 +1,29 @@ +*** config.c.orig Sun Apr 1 22:43:30 2001 +--- config.c Sun Apr 1 22:43:51 2001 +*************** +*** 135,141 **** + free((struct var *) vars); + vars = vp; + } +! if (vars) + for (new = vars; new->v_next;) + if (!strcmp(new->v_next->v_name, name)) { + vp = new->v_next->v_next; +--- 135,141 ---- + free((struct var *) vars); + vars = vp; + } +! if (vars) { + for (new = vars; new->v_next;) + if (!strcmp(new->v_next->v_name, name)) { + vp = new->v_next->v_next; +*************** +*** 143,148 **** +--- 143,149 ---- + new->v_next = vp; + } else + new = new->v_next; ++ } + } + + char *vcopy(char *str) diff --git a/audio/wmix/pkg-comment b/audio/wmix/pkg-comment new file mode 100644 index 000000000000..c747768eb34c --- /dev/null +++ b/audio/wmix/pkg-comment @@ -0,0 +1 @@ +An audio mixer for the WindowMaker dock with TV-like OSD diff --git a/audio/wmix/pkg-descr b/audio/wmix/pkg-descr new file mode 100644 index 000000000000..cfc371cf11cf --- /dev/null +++ b/audio/wmix/pkg-descr @@ -0,0 +1,10 @@ +WindowMaker dockapp mixer that allows toggling record source, muting individual +channels, adjusting volume and balance, all in a compact dockapp size, with +TV-like on-screen-display for volume levels. Supports mousewheel to adjust +current channel volume, and can be controlled remotely with SIGUSR1 / SIGUSR2 +to adjust the volume, too. Keeps a simple configuration file for user-defined +settings. + +WWW: http://www.ne.jp/asahi/linux/timecop/ + +-- K. Konstantinidis <kkonstan@daemon.gr> diff --git a/audio/wmix/pkg-plist b/audio/wmix/pkg-plist new file mode 100644 index 000000000000..75b518659d19 --- /dev/null +++ b/audio/wmix/pkg-plist @@ -0,0 +1 @@ +bin/wmix |