Debian Codegraph @

docs/afInitSampleFormat.3.txt

raw
1 afInitSampleFormat(3)
2 =====================
3
4 NAME
5 ----
6 afInitSampleFormat, afInitByteOrder, afInitChannels, afInitRate -
7 initialize audio data format for a track in an audio file setup
8
9 SYNOPSIS
10 --------
11 #include <audiofile.h>
12
13 void afInitSampleFormat(AFfilesetup setup, int track, int sampleFormat,
14 int sampleWidth);
15 void afInitByteOrder(AFfilesetup setup, int track, int byteOrder);
16 void afInitChannels(AFfilesetup setup, int track, int channels);
17 void afInitRate(AFfilesetup setup, int track, double rate);
18
19 PARAMETERS
20 ----------
21 `setup` is a valid file setup returned by linkaf:afNewFileSetup[3].
22
23 `track` specifies a track within the audio file setup. `track` is always
24 `AF_DEFAULT_TRACK` for all currently supported file formats.
25
26 `sampleFormat` is a symbolic constant specifying the sample format
27 for the audio data in the track. `sampleFormat` must be one of
28 `AF_SAMPFMT_TWOSCOMP`, `AF_SAMPFMT_UNSIGNED`, `AF_SAMPFMT_FLOAT`, or
29 `AF_SAMPFMT_DOUBLE`.
30
31 `sampleWidth` is a positive integer specifying the number of bits for
32 each sample in the track.
33
34 `byteOrder` is a symbolic constant specifying the byte order of
35 the track. `byteOrder` must be one of `AF_BYTEORDER_BIGENDIAN` or
36 `AF_BYTEORDER_LITTLEENDIAN`.
37
38 `channels` is a positive integer specifying the number of channels in
39 the track.
40
41 `rate` is a positive double-precision floating-point number specifying
42 the sample rate of the track.
43
44 DESCRIPTION
45 -----------
46 `afInitSampleFormat` initializes the track to the specified sample format
47 and sample width.
48
49 `afInitByteOrder` initializes the track to the specified byte order.
50
51 `afInitChannels` initializes the track to the specified number of channels.
52
53 `afInitRate` initializes the track to the specified sample rate.
54
55 ERRORS
56 ------
57 `afInitSampleFormat`, `afInitByteOrder`, `afInitChannels`, and
58 `afInitRate` can produce the following errors:
59
60 [horizontal]
61 `AF_BAD_FILESETUP`:: `setup` represents an invalid file setup.
62 `AF_BAD_TRACK`:: `track` represents an invalid track identifier.
63
64 `afInitSampleFormat` can also produce the following errors:
65
66 [horizontal]
67 `AF_BAD_SAMPFMT`:: `sampleFormat` does not represent a valid sample format.
68 `AF_BAD_WIDTH`:: `sampleWidth` is not a valid sample width.
69
70 `afInitByteOrder` can also produce the following error:
71
72 [horizontal]
73 `AF_BAD_BYTEORDER`:: `byteOrder` does not represent a valid byte order.
74
75 `afInitChannels` can also produce the following error:
76
77 [horizontal]
78 `AF_BAD_CHANNELS`:: `channels` specifies an invalid number of channels.
79
80 `afInitRate` can also produce the following error:
81
82 [horizontal]
83 `AF_BAD_RATE`:: `rate` specifies an invalid sample rate.
84
85 SEE ALSO
86 --------
87 linkaf:afNewFileSetup[3],
88 linkaf:afInitFileFormat[3],
89 linkaf:afInitCompression[3],
90 linkaf:afOpenFile[3]
91
92 AUTHOR
93 ------
94 Michael Pruett <[email protected]>