InfoAudio
Routine
-
InfoAudio [options] AFile1 [AFile2 ... ]
Purpose
-
Print audio file information
Description
This program prints information about a number of audio files to standard
output. The information about the internal structure of the files is in a
form that can be easily parsed by a shell script.
The full output consists of the file type and name (indented part of the
output below), the file data parameters, and the header information records.
AFsp audio file: /usr/local/src/audio/InfoAudio/test/xx.au
Number of samples : 23808 1994/02/04 14:12:50 UTC
Sampling frequency: 8000 Hz
Number of channels: 1 (16-bit integer)
File name: xx.au
Header length: 104
Sampling frequency: 8000
No. samples: 23808
No. channels: 1
Data type: integer16 - mu-law8, integer16 or float32
File byte order: big-endian - big-endian, little-endian, or byte-stream
Host byte order: big-endian - big-endian or little-endian
--Header information records--
date:1994/02/04 14:12:50 UTC
user:library@aldebaran
program:CopyAudio
For single byte data, the "File byte order" field is set to "byte-stream".
Non-printing characters (as defined by the routine isprint) in the header
information records are replaced by question marks.
Options
The command line specifies options and the file name.
-
-P PARMS, --parameters=PARMS
-
Parameters to be used for headerless input files. This option may be
given more than once. Each invokation applies to the files that follow
the option. See the description of the environment variable RAWAUDIOFILE
below for the format of the parameter specification.
-
-i ICODE, --info_code=ICODE
-
Parameter to choose the information to be printed. The information that
can be printed consists of three parts. The ICODE parameter is the sum
of the codes which control printing of the individual parts.
1: Print the file type and name
2: Print the file data parameters
4: Print the header information records
The default is to print all of the information (ICODE=7). For ICODE=0,
no information is printed, but the program return code indicates if all
files were opened successfully.
-
-h, --help
-
Print a list of options and exit.
-
-v, --version
-
Print the version number and exit.
Environment variables
-
RAWAUDIOFILE:
This environment variable defines the data format for headerless or
non-standard input audio files. The string consists of a list of parameters
separated by commas. The form of the list is
"Format, Start, Sfreq, Swapb, Nchan, ScaleF"
-
Format: File data format
-
The lowercase versions of these format specifiers cause a headerless
file to be accepted only after checking for standard file headers; the
uppercase versions cause a headerless file to be accepted without
checking the file header.
"undefined" - Headerless files will be rejected
"mu-law8" or "MU-LAW8" - 8-bit mu-law data
"A-law8" or "A-LAW8" - 8-bit A-law data
"unsigned8" or "UNSIGNED8" - offset-binary 8-bit integer data
"integer8" or "INTEGER8" - two's-complement 8-bit integer data
"integer16" or "INTEGER16" - two's-complement 16-bit integer data
"float32" or "FLOAT32" - 32-bit floating-point data
"text" or "TEXT" - text data
-
Start: byte offset to the start of data (integer value)
-
Sfreq: sampling frequency in Hz (floating point number)
-
Swapb: Data byte swap parameter
-
"native" - no byte swapping
"little-endian" - file data is in little-endian byte order
"big-endian" - file data is in big-endian byte order
"swap" - swap the data bytes as the data is read
-
Nchan: number of channels
-
The data consists of interleaved samples from Nchan channels
-
ScaleF: Scale factor
-
Scale factor applied to the data from the file
The default values for the audio file parameters correspond to the following
string.
"undefined, 0, 8000., native, 1, 1.0"
-
AUDIOPATH:
This environment variable specifies a list of directories to be searched when
opening the input audio files. Directories in the list are separated by
colons (semicolons for MS-DOS).
Author / version
P. Kabal / v2r2 1996/08/12
See Also
CompAudio
Main Index audio