Date: Wed, 13 Jan 1999 21:27:24 +0200 From: Sheldon Hearn <axl@iafrica.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: ports/9472: [PATCH] audio/xamp: balance and volume controls broken Message-ID: <22885.916255644@axl.noc.iafrica.com>
next in thread | raw e-mail | index | archive | help
>Number: 9472 >Category: ports >Synopsis: [PATCH] audio/xamp: balance and volume controls broken >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jan 13 11:30:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Sheldon Hearn >Release: FreeBSD 3.0-CURRENT i386 >Organization: UUNET Internet Africa >Environment: N/A >Description: The audio/xamp port currently installs an xamp binary with balance and volume controls that do nothing. This is because BSD audio support seems to have been added to the software as an afterthought. >How-To-Repeat: Install the port and run it. Notice that sliding the volume and or balance controls achieves nothing. >Fix: The following patch replaces some stupid ifdefs with ones that actually get the mixer code included. :) --- /home/sheldonh/xamp/patches/patch-aa Wed Jan 13 21:11:21 1999 +++ ports/audio/xamp/patches/patch-aa Wed Jan 13 20:59:37 1999 @@ -12,3 +12,52 @@ #include <sys/time.h> #include <sys/resource.h> #include <errno.h> +@@ -84,11 +84,11 @@ + splash->show(); + + // init mixer +-#ifdef OS_Linux ++#if defined(OS_Linux) || defined(OS_BSD) + if ((mixer = open("/dev/mixer", O_RDWR)) < 0) + die("Error opening /dev/mixer, exiting\n"); + ioctl(mixer, SOUND_MIXER_READ_PCM, &v); +-#endif OS_Linux ++#endif + + /* where mine resource file is located */ + char home[500]; +@@ -262,7 +262,7 @@ + + QtAMP::~QtAMP() + { +-#ifdef OS_Linux ++#if defined(OS_Linux) || defined(OS_BSD) + close(mixer); + #endif + real_quit(); +@@ -348,7 +348,7 @@ + sprintf(volum,"Volume: %d",vr); + playLabel->setText( volum ); + // printf("%d %d\n",tvr,tv); +-#ifdef OS_Linux ++#if defined(OS_Linux) || defined(OS_BSD) + int x = (tv*256 + tvl); + ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x); + #endif +@@ -884,14 +884,14 @@ + { + if (mute == 1) + { +-#ifdef OS_Linux ++#if defined(OS_Linux) || defined(OS_BSD) + int x = (tv*256 + tvl); + ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x); + #endif + } + if (mute == 0) + { +-#ifdef OS_Linux ++#if defined(OS_Linux) || defined(OS_BSD) + int x = (7*256 + 7); + ioctl(mixer, SOUND_MIXER_WRITE_PCM, &x); + #endif >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?22885.916255644>