File: AFsetHinfo.html

package info (click to toggle)
libtsp 3r0-1
  • links: PTS
  • area: non-free
  • in suites: potato, woody
  • size: 5,096 kB
  • ctags: 1,798
  • sloc: ansic: 14,464; sh: 1,217; makefile: 182
file content (104 lines) | stat: -rw-r--r-- 3,494 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<HTML>
<HEAD>
<TITLE>TSP (libtsp/AF) - AFsetHinfo</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>AFsetHinfo</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
void AFsetHinfo (const char Info[])
<DT>
char *AFgetHinfo (void)
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Set the audio file header information string
<DT>
Get the audio file header information string
</DL>
<H4>Description</H4>
This routine sets the information string to be written to an audio file
header.  By default the header information records specify the date and user
name.  This routine allows the user to specify information records that are
used in addition to, or in place of, the standard header information.  This
routine must be called before the audio file to be created is first opened
using AFopenWrite.  AFopenWrite resets the header string to a NULL string.
<P>
Standard Header Information:
<PRE>
  date: 1994/01/25 19:19:39 UTC    date
  sample_rate: 8012.5              sampling frequency (if non-integer)
  user: kabal@aldebaran            user
  program: CopyAudio               program name (set by UTsetProg)
</PRE>
<P>
Additional structured information records should follow this format; a named
field terminated by a colon followed by numeric data or a character string.
Comments can follow as unstructured information.  For the purpose of this
routine, records are separated by newline characters. The last record need
not be terminated by a newline character.  When written to the header, the
newline characters are replaced by nulls.  To place a newline character
into the header without having it serve as a record separator, escape the
newline character by preceding it with a backslash character, i.e. in a
C-language string an escaped newline character would appear as "\\\n".
<P>
If the input header information string is a NULL pointer, the standard
information is used.  If the first character of the header information string
is a newline character, the input header information string is added to the
existing information records (the standard information and/or any previously
specified records).  Otherwise the input header information string replaces
the standard information.  The following examples illustrate the behaviour.
<P>
<DL>
<DT>
- AFsetHinfo (NULL)
<DD>
Reset, use only the standard information records
<DT>
- AFsetHinfo ("")
<DD>
No header information records
<DT>
- AFsetHinfo ("&lt;info&gt;")
<DD>
Replace existing information with &lt;info&gt;; do not use the standard
information records
<DT>
- AFsetHinfo ("\n&lt;info&gt;")
<DD>
Add &lt;info&gt; to the existing information string, if the overall information
string begins with a newline character, the overall information string
appears in the header after the standard information string
</DL>
<P>
The procedure AFgetHinfo is used internally by the audio file routines to
retrieve the user supplied header information string.
<H4>Parameters</H4>
<DL>
<DT>
AFsetHinfo:
<DT>
 -&gt; const char Info[]
<DD>
String containing the user supplied header information
<DT>
AFgetHinfo:
<DT>
&lt;-  char *AFgetUinfo
<DD>
Pointer to the header information string.  A NULL pointer indicates that
no information string has been set.
</DL>
<H4>Author / revision</H4>
P. Kabal  Copyright (C) 1998
/ Revision 1.33  1998/06/17
<H4>See Also</H4>
<A HREF="AFopenWrite.html">AFopenWrite</A>
<P>
<HR>
Main Index <A HREF="../libtsp.html">libtsp</A>
</BODY>
</HTML>