--- xmix-2.1.orig/Imakefile +++ xmix-2.1/Imakefile @@ -2,7 +2,7 @@ # xmix Imakefile. # #CDEBUGFLAGS=-gstabs -CDEBUGFLAGS=-O +CDEBUGFLAGS=-O -Wall #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' SRCS1= xmix.c --- xmix-2.1.orig/debian/changelog +++ xmix-2.1/debian/changelog @@ -0,0 +1,108 @@ +xmix (2.1-7) unstable; urgency=low + + * Add hurd support; thanks to Samuel Thibault for the patch. + Closes: #637533. + * Update debhelper usage + * Update Standards-Version + * Add hardening flags + * Fix up lots of lintian warnings + + -- Steve McIntyre <93sam@debian.org> Thu, 04 Sep 2014 23:23:29 +0100 + +xmix (2.1-6) unstable; urgency=low + + * Taking patch from the Non-maintainer upload - thanks Frank! + Closes: #368283 + + -- Steve McIntyre <93sam@debian.org> Sun, 21 May 2006 22:08:33 +0100 + +xmix (2.1-5.1) unstable; urgency=low + + * Non-maintainer upload. + * Install man pages into /usr/share/man, not /usr/X11R6/man + * Install command into /usr/bin, not /usr/X11R6/bin + * Correct path in menu file + * Change build dependency from xutils to xutils-dev + + -- Frank Lichtenheld Sun, 21 May 2006 00:53:33 -0500 + +xmix (2.1-5) unstable; urgency=low + + * New maintainer. + * Fix RC dependency on xlibs-dev. Closes: #346948 + * Add GNU/kFreeBSD support; thanks to Aurelien Jarno for the patch. + Closes: #336865 + * Updated Standards-Version. + * Updated debconf version requirement to 4 (remove warnings). + * Fixed compiler warnings. + * Fixed lintian warnings. + + -- Steve McIntyre <93sam@debian.org> Sun, 15 Jan 2006 19:49:07 +0000 + +xmix (2.1-4) unstable; urgency=low + + * New maintainer + * Change the way it decodes volume info to match gmix. + * Change to use debhelper + * Closes: #165460 + + -- Steve Dunham Thu, 31 Oct 2002 07:14:15 -0800 + +xmix (2.1-3.4) unstable; urgency=low + + * NMU + * xmix.c: Changed type of centering_width to Dimension and types + of volumes to int, fixes breakage on big-endian machines. + (closes: #133865) + + -- Lukas Geyer Sat, 31 Aug 2002 19:02:07 -0400 + +xmix (2.1-3.3) unstable; urgency=low + + * NMU + * Added the missing build dependency on libxaw7-dev. + (closes: #106844) + + -- Adrian Bunk Sat, 10 Nov 2001 10:39:13 +0100 + +xmix (2.1-3.2) unstable; urgency=low + + * NMU + * recompiled against modern libraries (Closes: #52938) + * lintian 1.20.9 clean + * debian/control: + - added Build-Depends + - bumped Standards-Version to 3.5.2 + * debian/menu: menu file from Adrian Bridgett (Closes: #72174) + * debian/rules: + - install documentation to /usr/share/doc + - install app-defaults file to correct place (Closes: #86318) + - install postinst and prerm scripts + * debian/{postinst,postrm,prerm}: + - handle /usr/doc symlink + - call update-menus if it exists + + -- Branden Robinson Fri, 16 Mar 2001 16:50:19 -0500 + +xmix (2.1-3.1) unstable; urgency=low + + * Libc6 compile to correct problems with mixed libs. (#11752,#14005) + + -- Martin Mitchell Mon, 17 Nov 1997 18:37:00 +1100 + +xmix (2.1-3) unstable; urgency=low + + * Converted to new source package format + + -- Owen Dunn Sat, 16 Nov 1996 18:07:29 +0000 + +xmix (2.1-2) unstable; urgency=low + + * No longer produces `Supported' debugging message + + -- Owen Dunn Thu, 11 Jul 1996 18:05:27 +0100 + +Local variables: +mode: debian-changelog +End: + --- xmix-2.1.orig/debian/compat +++ xmix-2.1/debian/compat @@ -0,0 +1 @@ +7 --- xmix-2.1.orig/debian/control +++ xmix-2.1/debian/control @@ -0,0 +1,14 @@ +Source: xmix +Section: sound +Priority: optional +Maintainer: Steve McIntyre <93sam@debian.org> +Build-Depends: debhelper (>= 7), libxt-dev, xutils-dev, libxaw7-dev +Standards-Version: 3.9.5 + +Package: xmix +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: X11-based interface to the Linux sound driver mixer + This interface to the sound driver mixer allows easy adjustment of the + sound card's input and output levels, and selection of sound source + for recording. --- xmix-2.1.orig/debian/copyright +++ xmix-2.1/debian/copyright @@ -0,0 +1,20 @@ +This is Debian GNU/Linux's prepackaged version of the xmix utility. This +package provides an X11 based graphical interface to the sound driver +mixer. + +This package was put together by me, Owen Dunn +, from the original sources, which I +obtained from: +rzbsdi01.uni-trier.de:/pub/unix/audio/xmix/xmix-2.1.tar.gz + +The changes were very minimal - merely adding support for the Debian +package maintenance scheme, by adding various debian/* files. + +xmix is Copyright (C) 1992 Steve Haehnichen. + +It is licensed under the General Public License version 1 or any later +version. You can find it in /usr/share/common-licenses/GPL-1 on a +Debian GNU system. + + + --- xmix-2.1.orig/debian/dirs +++ xmix-2.1/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +usr/share/man/man1 +etc/X11/app-defaults --- xmix-2.1.orig/debian/menu +++ xmix-2.1/debian/menu @@ -0,0 +1,2 @@ +?package(xmix):needs="x11" section="Applications/Sound" \ + title="xmix" command="/usr/bin/xmix" --- xmix-2.1.orig/debian/rules +++ xmix-2.1/debian/rules @@ -0,0 +1,65 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif + +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp + +build-stamp: + dh_testdir + + xmkmf + $(MAKE) LOCAL_LDFLAGS="$(LDFLAGS)" + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + #-$(MAKE) clean + -rm -f xmix.o Makefile xmix + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_install + +binary-indep: build install + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installmenu + dh_installman xmix.1 +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- xmix-2.1.orig/debian/source/format +++ xmix-2.1/debian/source/format @@ -0,0 +1 @@ +1.0 --- xmix-2.1.orig/debian/xmix.install +++ xmix-2.1/debian/xmix.install @@ -0,0 +1,2 @@ +xmix usr/bin +XMix etc/X11/app-defaults --- xmix-2.1.orig/xmix.c +++ xmix-2.1/xmix.c @@ -1,6 +1,5 @@ /*====================================================================== xmix: An X11 interface for Linux derived from: ----------- xmix: X interface to the Sound Blaster mixer. [ This file is a part of SBlast-BSD-1.5 ] @@ -22,7 +21,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301, USA * xmix.c,v * Revision 1.5 1992/09/14 03:17:21 steve @@ -50,7 +50,9 @@ #include #include +#include #include +#include /* * Include files required for all Toolkit programs @@ -77,7 +79,12 @@ #include "square_empty.bit" #include "square_with_x.bit" +#if defined(__linux__) #include +#endif +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__GNU__) +#include +#endif #define SOUND_FULL_SCALE 100.0 #define MAX_SOUND_VOL 95 @@ -114,8 +121,8 @@ typedef struct stereovolume { - unsigned char left; - unsigned char right; + int left; + int right; } StereoVolume; @@ -143,7 +150,7 @@ Widget topLevel, quit, whole, buttons, sliders; Widget sources, line_src, mic_src, cd_src, source_label; Widget line_src_label, mic_src_label, cd_src_label; -int centering_width; +Dimension centering_width; int mixer_fd; VolumeControl master, line, dsp, fm, cd, mic, bass, treble, reclvl; @@ -176,13 +183,19 @@ static void sync_slider(VolumeControl *vcptr) { float portion; + unsigned long vol; if (!vcptr->supported) return; - if (ioctl(mixer_fd,MIXER_READ(vcptr->mixer_id),&vcptr->volume) == -1) + if (ioctl(mixer_fd,MIXER_READ(vcptr->mixer_id),&vol) == -1) perror("Error reading volumes in sync_slider"); + + vcptr->volume.left = vol&0xff; + vcptr->volume.right = (vol>>8) & 0xff; + portion = PORTION(vcptr->volume.left); XawScrollbarSetThumb (vcptr->leftw, portion, SLIDER_LENGTH); + if (vcptr->rightw != NULL) { portion = PORTION(vcptr->volume.right); @@ -208,13 +221,14 @@ static void Handle_lock(Widget w, XtPointer client_data, XtPointer call_data) { VolumeControl *vcptr = client_data; + unsigned long vol = vcptr->volume.left | (vcptr->volume.right << 8); vcptr->locked = !(vcptr->locked); if (vcptr->locked && vcptr->volume.left != vcptr->volume.right) { vcptr->volume.left = vcptr->volume.right = ((vcptr->volume.left + vcptr->volume.right)/2); - if (ioctl(mixer_fd,MIXER_WRITE(vcptr->mixer_id),&vcptr->volume) == -1) + if (ioctl(mixer_fd,MIXER_WRITE(vcptr->mixer_id),&vol) == -1) perror("Error in Handle_lock writing volumes"); sync_slider(vcptr); } @@ -345,9 +359,10 @@ */ if (update_needed) { + unsigned long vol = vcptr->volume.left | (vcptr->volume.right << 8); DPRINTF (("set_slider: updating mixer\n")); if (vcptr->supported - && ioctl(mixer_fd,MIXER_WRITE(vcptr->mixer_id),&vcptr->volume) == -1) + && ioctl(mixer_fd,MIXER_WRITE(vcptr->mixer_id),&vol) == -1) perror("Error writing mixer in Handle_slider"); } return; @@ -450,7 +465,7 @@ } -void main (int argc, char **argv) +int main (int argc, char **argv) { XtAppContext app_context; int scroll_sep, longway; @@ -717,7 +732,9 @@ mic.locked = 0; reclvl.locked = 0; +#ifdef DEBUG printf("supported = 0x%x\n",supported); +#endif set_supported(&master,(supported & SOUND_MASK_VOLUME) != 0); set_supported(&bass,(supported & SOUND_MASK_BASS) != 0); set_supported(&treble,(supported & SOUND_MASK_TREBLE) != 0); @@ -741,4 +758,5 @@ XtRealizeWidget (topLevel); /* Action! */ XtAppMainLoop (app_context); /* Loop for events */ + return 0; }