1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Add wmix 2.2, an audio mixer for the WindowMaker dock with TV-like

OSD.

PR:		26276
Submitted by:	Konstantinos Konstantinidis <kkonstan@daemon.gr>
This commit is contained in:
Will Andrews 2001-04-07 04:43:40 +00:00
parent 42dd5bff2c
commit f647d198ec
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=40995
9 changed files with 250 additions and 0 deletions

View File

@ -181,6 +181,7 @@
SUBDIR += waveplay
SUBDIR += wavplay
SUBDIR += wmcdplay
SUBDIR += wmix
SUBDIR += wmmixer
SUBDIR += wmmp3
SUBDIR += wmtune

25
audio/wmix/Makefile Normal file
View File

@ -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>

1
audio/wmix/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (wmix-2.2-oss.tar.gz) = d8f7a51e0130c89e168631e2504477cb

34
audio/wmix/files/patch-aa Normal file
View File

@ -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

148
audio/wmix/files/patch-ab Normal file
View File

@ -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));
}

29
audio/wmix/files/patch-ac Normal file
View File

@ -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)

1
audio/wmix/pkg-comment Normal file
View File

@ -0,0 +1 @@
An audio mixer for the WindowMaker dock with TV-like OSD

10
audio/wmix/pkg-descr Normal file
View File

@ -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>

1
audio/wmix/pkg-plist Normal file
View File

@ -0,0 +1 @@
bin/wmix