From owner-freebsd-ports Wed Jan 13 11:30:46 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA09773 for freebsd-ports-outgoing; Wed, 13 Jan 1999 11:30:46 -0800 (PST) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA09751 for ; Wed, 13 Jan 1999 11:30:39 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id LAA14673; Wed, 13 Jan 1999 11:30:02 -0800 (PST) Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA09211 for ; Wed, 13 Jan 1999 11:29:05 -0800 (PST) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 2.10 #1) id 100Vwq-0005x8-00 for FreeBSD-gnats-submit@freebsd.org; Wed, 13 Jan 1999 21:27:24 +0200 Message-Id: <22885.916255644@axl.noc.iafrica.com> Date: Wed, 13 Jan 1999 21:27:24 +0200 From: Sheldon Hearn Reply-To: Sheldon Hearn To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: ports/9472: [PATCH] audio/xamp: balance and volume controls broken Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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 #include #include +@@ -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