1AFINITSAMPLEFORMAT(3)                                    AFINITSAMPLEFORMAT(3)
2
3
4

NAME

6       afInitSampleFormat, afInitByteOrder, afInitChannels, afInitRate -
7       initialize audio data format for a track in an audio file setup
8

SYNOPSIS

10       #include <audiofile.h>
11
12       void afInitSampleFormat(AFfilesetup setup, int track, int sampleFormat,
13           int sampleWidth);
14       void afInitByteOrder(AFfilesetup setup, int track, int byteOrder);
15       void afInitChannels(AFfilesetup setup, int track, int channels);
16       void afInitRate(AFfilesetup setup, int track, double rate);
17

PARAMETERS

19       setup is a valid file setup returned by afNewFileSetup(3).
20
21       track specifies a track within the audio file setup. track is always
22       AF_DEFAULT_TRACK for all currently supported file formats.
23
24       sampleFormat is a symbolic constant specifying the sample format for
25       the audio data in the track. sampleFormat must be one of
26       AF_SAMPFMT_TWOSCOMP, AF_SAMPFMT_UNSIGNED, AF_SAMPFMT_FLOAT, or
27       AF_SAMPFMT_DOUBLE.
28
29       sampleWidth is a positive integer specifying the number of bits for
30       each sample in the track.
31
32       byteOrder is a symbolic constant specifying the byte order of the
33       track. byteOrder must be one of AF_BYTEORDER_BIGENDIAN or
34       AF_BYTEORDER_LITTLEENDIAN.
35
36       channels is a positive integer specifying the number of channels in the
37       track.
38
39       rate is a positive double-precision floating-point number specifying
40       the sample rate of the track.
41

DESCRIPTION

43       afInitSampleFormat initializes the track to the specified sample format
44       and sample width.
45
46       afInitByteOrder initializes the track to the specified byte order.
47
48       afInitChannels initializes the track to the specified number of
49       channels.
50
51       afInitRate initializes the track to the specified sample rate.
52

ERRORS

54       afInitSampleFormat, afInitByteOrder, afInitChannels, and afInitRate can
55       produce the following errors:
56
57
58       AF_BAD_FILESETUP   setup represents an
59                          invalid file setup.
60
61       AF_BAD_TRACK       track represents an
62                          invalid track identifier.
63
64
65       afInitSampleFormat can also produce the following errors:
66
67
68       AF_BAD_SAMPFMT   sampleFormat does not
69                        represent a valid sample
70                        format.
71
72       AF_BAD_WIDTH     sampleWidth is not a valid
73                        sample width.
74
75
76       afInitByteOrder can also produce the following error:
77
78
79       AF_BAD_BYTEORDER   byteOrder does not
80                          represent a valid byte
81                          order.
82
83
84       afInitChannels can also produce the following error:
85
86
87       AF_BAD_CHANNELS   channels specifies an
88                         invalid number of
89                         channels.
90
91
92       afInitRate can also produce the following error:
93
94
95       AF_BAD_RATE   rate specifies an invalid
96                     sample rate.
97
98

SEE ALSO

100       afNewFileSetup(3), afInitFileFormat(3), afInitCompression(3),
101       afOpenFile(3)
102

AUTHOR

104       Michael Pruett <michael@68k.org>
105
106
107
108Audio File Library 0.3.6          03/06/2013             AFINITSAMPLEFORMAT(3)
Impressum