From alsa-devel-owner@alsa.jcu.cz  Sat Oct  3 07:38:23 1998
Received: from rdaneel.dyn.ml.org (res-1097.usc.edu [128.125.245.177])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id HAA28918
	for <alsa-devel@jcu.cz>; Sat, 3 Oct 1998 07:37:59 +0200
Received: from localhost (brion@localhost)
	by rdaneel.dyn.ml.org (8.8.7/8.8.7) with ESMTP id WAA17888
	for <alsa-devel@jcu.cz>; Fri, 2 Oct 1998 22:37:47 -0700
Date: Fri, 2 Oct 1998 22:37:46 -0700 (PDT)
From: Brion Vibber <brion@pobox.com>
To: alsa-devel@jcu.cz
Subject: Re: XAmixer
In-Reply-To: <Pine.LNX.4.05.9810022159140.28778-100000@screech.cs.alfred.edu>
Message-ID: <Pine.LNX.4.03.9810022129110.17732-100000@rdaneel.dyn.ml.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Fri, 2 Oct 1998, Christopher T. Lansdown wrote:

> Hello everyone,
> 	I've written an ALSA based mixer in the gtk toolkit.  It is still
> alpha, but does have functionality on my system.  The URL is
> http://towerhs.dyn.ml.org/linux/xamixer - I'll put everything up on my
> home page at the CS dept. once xamixer moves into beta.  For those who
> can't resolve dynDNS addresses, my IP address should be 149.84.146.173 for
> a while.  All comments, suggestions, etc. appreciated.

One quick nit to pick - your link to the ALSA site doesn't include the
protocol and is interpreted by the browser as a local file. Whoops!

Now to the program... I can't adjust the volume for the channel my TV card
(Hauppage Wincast - bt848) is sending its sound through. The sound card is
an Ensoniq AudioPCI (es1370), and this is an internal connection to which
a voice modem was originally connected. In alsamixer it is labeled "mono
2", and there is also a "mono 1" but I get no sound out of it.

I also find it rather counterintuitive that low volume is at the top and
high volume at the bottom... this might be a problem with GTK+ though (?),
I'm using 1.1.2. The "|-|" button I assume is to lock left/right volumes,
and also does not work for me. Mute does work.

Looking at the code... there's a lot done that's very repetitive -
checking the various channels, creating the volume controls, etc. This is
very repetitive. ;) Also hard to maintain - adding additional channels
needs to be done in many places, and if any code handling the channels
is changed the changes must be duplicated for each channel... It might be
better to have one array of channels (containing the constants for use
talking to ALSA and the descriptive names) and iterate through it.
Slightly slower but a smaller executable size and much easier to maintain.

I did hack in support for the mono, mono1, and mono2 channels into the
existing code easily enough though, I can send a patch if you wish.

-- brion vibber (brion@pobox.com)


