SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
spr_copy.c File Reference

File copying with conversion. More...

Detailed Description

File copying with conversion.

spr_copy [-A](flag: ASCII) [-H](flag: HEADER) [-HL](flag: HEADER_LEN) [-i ifname](stdin)
    [-o ofname](stdout) [-t type] [-f firstframe:lastframe] [-c firstchannel:lastchannel]
    [-p firstparam:lastparam] [-l length](-1) (-Fd==-t)
Parameters
-AflagASCII
Produce an output file in ASCII format.
-HflagHEADER
Dump the header; do not copy data.
-HLflagHEADER_LEN
Add the key HEADER_LEN to the header; useful for programs that just want to skip the header.
-i<em>ifname</em><aname="spr_copy.i" class="el">
Input file name.
-o<em>ofname</em><aname="spr_copy.o" class="el">
Output file name.
-t<em>type</em><aname="spr_copy.t" class="el">
Data type to use for the output. Possibilities are: [UI](8|16|32|64) for unsigned/signed 8/16/32/64 bits integers, F(32|64) for single/double precision floats, or ULAW/ALAW for u-law/a-law encoding.
-f<em>firstframe:lastframe</em><aname="spr_copy.f" class="el">
Select these specific frames (normally all frames are used).
-c<em>firstchannel:lastchannel</em><aname="spr_copy.c" class="el">
This option only applies to SAMPLE files. Select channels in a multichannel data file, default is all channels.
-p<em>firstparam:lastparam</em><aname="spr_copy.p" class="el">
This option only applies to TRACK or PARAM files. Select parameters in a track data file, default is all parameters.
-l<em>length</em><aname="spr_copy.l" class="el">
Frame length for sampled data; by default the value of FSHIFT or if not available FLENGTH, or if not available the default value (0.01) is used.

File copying with conversion. This program performs general purpose copy and conversion actions.

Depending on the content of the file, spr_copy can

Note
files such as .hmm and .sel which store variable length and/or sparse data superimpose is simple matrix (single column vector) layout on top of the real data layout. This assures that basic operations like "spr_copy -A" for viewing the raw content still work. However, selecting data from such a file will break the real data layout and will result in a corrupted file.
Author
Kris Demuynck
Date
08 Sep 1991
Revision History:
8 Sep 1991 - Dirk Van Compernolle
implementation of original version
3 Mar 1994 - Frank Schoeters
added test on requested number of data to copy to prevent array access to reach out of bounds.
8 Dec 1994 - Frank Schoeters
added the options `S' and `nchan' to allow specifying the sample frequency and the number of channels.
1 Jun 2008 - KD
reimplementation for SPRAAK