Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/audio If not specified on the command line, attempt ...
details: https://anonhg.NetBSD.org/src/rev/8caa6dfe4c2a
branches: trunk
changeset: 474637:8caa6dfe4c2a
user: kleink <kleink%NetBSD.org@localhost>
date: Tue Jul 13 14:02:33 1999 +0000
description:
If not specified on the command line, attempt to fall back to the environment
variables AUDIODEVICE (for -d) and AUDIOCTLDEVICE (for -C, already used in
audioctl(1)) before falling back to _PATH_* constants.
diffstat:
usr.bin/audio/play/audioplay.1 | 10 +++++++++-
usr.bin/audio/play/play.c | 7 ++++---
usr.bin/audio/record/audiorecord.1 | 10 +++++++++-
usr.bin/audio/record/record.c | 7 ++++---
4 files changed, 26 insertions(+), 8 deletions(-)
diffs (106 lines):
diff -r 7d309fe4a1f6 -r 8caa6dfe4c2a usr.bin/audio/play/audioplay.1
--- a/usr.bin/audio/play/audioplay.1 Tue Jul 13 11:12:49 1999 +0000
+++ b/usr.bin/audio/play/audioplay.1 Tue Jul 13 14:02:33 1999 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: audioplay.1,v 1.4 1999/04/02 16:05:55 augustss Exp $
+.\" $NetBSD: audioplay.1,v 1.5 1999/07/13 14:02:33 kleink Exp $
.\"
.\" Copyright (c) 1998-1999 Matthew R. Green
.\" All rights reserved.
@@ -118,6 +118,13 @@
option, sets the sample rate to it's argument. This value must be a
valid value for the audio device or an error will be returned.
.El
+.Sh ENVIRONMENT
+.Bl -tag -width AUDIOCTLDEVICE
+.It AUDIOCTLDEVICE
+the audio control device to be used.
+.It AUDIODEVICE
+the audio device to be used.
+.El
.Sh NOTES
.Nm
can be used to play Sun/NeXT audio files, and also RIFF WAVE audio files.
@@ -150,6 +157,7 @@
.Xr aria 4 ,
.Xr audio 4 ,
.Xr eap 4 ,
+.Xr eso 4 ,
.Xr ess 4 ,
.Xr gus 4 ,
.Xr guspnp 4 ,
diff -r 7d309fe4a1f6 -r 8caa6dfe4c2a usr.bin/audio/play/play.c
--- a/usr.bin/audio/play/play.c Tue Jul 13 11:12:49 1999 +0000
+++ b/usr.bin/audio/play/play.c Tue Jul 13 14:02:33 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: play.c,v 1.10 1999/05/17 02:03:36 jtk Exp $ */
+/* $NetBSD: play.c,v 1.11 1999/07/13 14:02:34 kleink Exp $ */
/*
* Copyright (c) 1999 Matthew R. Green
@@ -156,9 +156,10 @@
errx(1, "unknown encoding, bailing...");
}
- if (device == NULL)
+ if (device == NULL && (device = getenv("AUDIODEVICE")) == NULL &&
+ (device = getenv("AUDIODEV")) == NULL) /* Sun compatibility */
device = _PATH_AUDIO;
- if (ctldev == NULL)
+ if (ctldev == NULL && (ctldev = getenv("AUDIOCTLDEVICE")) == NULL)
ctldev = _PATH_AUDIOCTL;
audiofd = open(device, O_WRONLY);
diff -r 7d309fe4a1f6 -r 8caa6dfe4c2a usr.bin/audio/record/audiorecord.1
--- a/usr.bin/audio/record/audiorecord.1 Tue Jul 13 11:12:49 1999 +0000
+++ b/usr.bin/audio/record/audiorecord.1 Tue Jul 13 14:02:33 1999 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: audiorecord.1,v 1.5 1999/04/14 09:03:41 mrg Exp $
+.\" $NetBSD: audiorecord.1,v 1.6 1999/07/13 14:02:34 kleink Exp $
.\"
.\" Copyright (c) 1998-1999 Matthew R. Green
.\" All rights reserved.
@@ -124,6 +124,13 @@
.Ar volume .
This value must be between 0 and 255.
.El
+.Sh ENVIRONMENT
+.Bl -tag -width AUDIOCTLDEVICE
+.It AUDIOCTLDEVICE
+the audio control device to be used.
+.It AUDIODEVICE
+the audio device to be used.
+.El
.Sh BUGS
Many audio device hardware is limited in capabilities. Any attempt
to use an audio device beyond it's capabilities will result in an
@@ -149,6 +156,7 @@
.Xr aria 4 ,
.Xr audio 4 ,
.Xr eap 4 ,
+.Xr eso 4 ,
.Xr ess 4 ,
.Xr gus 4 ,
.Xr guspnp 4 ,
diff -r 7d309fe4a1f6 -r 8caa6dfe4c2a usr.bin/audio/record/record.c
--- a/usr.bin/audio/record/record.c Tue Jul 13 11:12:49 1999 +0000
+++ b/usr.bin/audio/record/record.c Tue Jul 13 14:02:33 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: record.c,v 1.5 1999/06/19 05:20:17 itohy Exp $ */
+/* $NetBSD: record.c,v 1.6 1999/07/13 14:02:34 kleink Exp $ */
/*
* Copyright (c) 1999 Matthew R. Green
@@ -172,9 +172,10 @@
/*
* open the audio device, and control device
*/
- if (device == NULL)
+ if (device == NULL && (device = getenv("AUDIODEVICE")) == NULL &&
+ (device = getenv("AUDIODEV")) == NULL) /* Sun compatibility */
device = _PATH_AUDIO;
- if (ctldev == NULL)
+ if (ctldev == NULL && (ctldev = getenv("AUDIOCTLDEVICE")) == NULL)
ctldev = _PATH_AUDIOCTL;
audiofd = open(device, O_RDONLY);
Home |
Main Index |
Thread Index |
Old Index