Commit Graph

26 Commits

Author SHA1 Message Date
jkim
1e6f2f459f Fix a typo. 2008-03-15 01:36:20 +00:00
jkim
a277d9b482 Clean up code and fix style(9) nits. 2008-03-15 01:20:05 +00:00
jkim
8d2f6ea689 - Check device masks and bypass printing headers if capable device does
not exist.  /etc/rc.d/mixer tried to restore non-existent recording
source because /var/var/db/mixer*-state contains '=rec' for example.
- Remove hardcoded mixer2 and mixer3 and do the right thing.
- Replace getopt(3) with hand-rolled option parser.  It was not able
to handle 'mixer -rec mic' although it is a valid command.
- Make '-s' and '-S' mutualy exclusive as mixer(8) says.
- Do not re-read recording source unless it has been modified.
2008-03-15 01:09:47 +00:00
ariff
a5d25bd12d - Fix possible memory leak due to repetetive strdup(3) without matching
free(3).
- print_recsrc() should honor shortflag and give appropriate output for
  later consumption by /etc/rc.d/mixer. This will ensure that recording
  device selections survived across reboot. Output everything to stdout
  instead if stderr.

MFC after:	3 days
2006-01-01 20:19:49 +00:00
mdodd
c94ee5f99f Add the -S flag which produces the -s output without
mixing field separators.
2005-04-13 07:11:54 +00:00
grehan
2dafdd4f00 Userland signed char fixes for PPC build. Problems were using a char
return for getopt() and comparing to -1, ditto with fgetc() and EOF,
and using the kg_nice value from <sys/user.h>

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
Reviewed by: obrien, bde (a while back)
Tested lightly on: ppc, i386, make universe
2004-01-22 07:23:36 +00:00
grog
3d6bd8a137 Print out the current recording devices in the default printout.
Discussed with: cg

Break some particularly long lines.

Still not enough for:  bde.
2003-06-15 08:46:04 +00:00
obrien
7293a24a2b Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
mdodd
44c5b8459b Implement relative mixer adjustment.
PR:		46679 (similar functionality)
2003-04-09 15:25:52 +00:00
jmallett
0426bfe115 Print old mixer levels when setting new ones. 2002-12-30 04:23:08 +00:00
dd
e214cd8873 Constify and set WARNS=2.
Submitted by:	Mike Barcroft <mike@q9media.com
Reviewed by:	md5(1)
2001-06-25 21:06:15 +00:00
greid
bb5c93f5b8 Change the behaviour of mixer slightly such that not explicitly specifying
a mixer device will set/get the master volume levels

PR:		25156
Submitted by:	Tony Finch <dot@dotat.at>
Reviewed by:	cg, nik
2001-04-09 11:10:34 +00:00
kris
608224f4ac Fix format string warnings 2000-11-27 07:57:44 +00:00
sobomax
18c955d6f3 Several cleanups:
- use getopt(3) to parse command line arguments instead of home-made incomplete
  parser;
- be more verbose when error in command line encountered (i.e. incorrect
  playing/recording device, incorrect recsrc syntax).
2000-08-15 05:42:39 +00:00
jkh
cf6c24f27f I've always wanted to be able to dump out the current values of
the mixer in a format suitable for saving and handing off to
mixer(1) at some future date to restore the settings.
Add a -s flag to do this.
2000-05-20 23:25:08 +00:00
peter
7129242123 remove #ifdef FreeBSD -> <machine/soundcard.h> special case as we have it
in the standard location now.
1999-09-04 15:20:48 +00:00
peter
efabb9ccb1 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
jmg
952a7718da fix a core dump problem when you don't give -f a parameter... also compare
results of strcmp against 0 instead of !'ing results...

Closes PR: 6538
1998-05-07 14:13:16 +00:00
charnier
350fc0457c According to Bruce, err(-1,..) is bogus. Change it to err(1,..). More commits
to come in this area.
1997-10-01 06:34:09 +00:00
charnier
bb93f8d912 Use err(3). 1997-09-29 06:38:49 +00:00
ache
61a656ae1e Compact usage string, devices list can be too long 1997-09-23 23:24:13 +00:00
jmg
d3d13402b9 major modifications to the mixer. currently it doesn't report errors
that it encounters (such as invalid device), but does print usage upon
this error...

but otherwise allows complex commands such as:
mixer -f /dev/mixer4 synth line 50 -rec mic +rec line =rec cd ^rec mix
1997-09-19 13:38:51 +00:00
mpp
9eb26b886b Make mixer print out all of the current mixer settings by defualt
instead of making the user run a separate command for each
setting they are interested in.  Closes PR#432.
1996-01-31 18:01:22 +00:00
mpp
1932d7e86d Fixed to not core dump if not enough arguments are given
with the +rec and -rec options.
1996-01-15 09:11:17 +00:00
rgrimes
4f960dd75f Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
ache
48179f425a non-X mixer, useful into rc.local 1995-02-15 17:33:04 +00:00