1 | The functions afSetVirtualSampleFormat, afSetVirtualByteOrder, |
---|
2 | afSetVirtualChannels, afSetVirtualPCMMapping set the virtual data |
---|
3 | format for a particular track of an audio file. |
---|
4 | |
---|
5 | SYNOPSIS |
---|
6 | |
---|
7 | #include <audiofile.h> |
---|
8 | |
---|
9 | int afSetVirtualSampleFormat (AFfilehandle file, int track, |
---|
10 | int sampleFormat, int sampleWidth); |
---|
11 | |
---|
12 | int afSetVirtualByteOrder (AFfilehandle file, int track, |
---|
13 | int byteOrder); |
---|
14 | |
---|
15 | int afSetVirtualChannels (AFfilehandle file, int track, int channels); |
---|
16 | |
---|
17 | int afSetVirtualRate (AFfilehandle file, int track, double rate); |
---|
18 | |
---|
19 | int afSetVirtualPCMMapping (AFfilehandle file, int track, |
---|
20 | double slope, double intercept, double minclip, double maxclip); |
---|
21 | |
---|
22 | PARAMETERS |
---|
23 | |
---|
24 | * file is an AFfilehandle which refers to an open audio file and is |
---|
25 | usually created by afOpenFile. |
---|
26 | |
---|
27 | * track is an integer which identifies a particular track in an open |
---|
28 | audio file. The only valid track is AF_DEFAULT_TRACK for all |
---|
29 | currently supported file formats. |
---|
30 | |
---|
31 | * sampleFormat is an integer which denotes a virtual sample format. |
---|
32 | Valid values are AF_SAMPFMT_TWOSCOMP, AF_SAMPFMT_UNSIGNED, |
---|
33 | AF_SAMPFMT_FLOAT, and AF_SAMPFMT_DOUBLE. Note that this |
---|
34 | implementation of the Audio File Library only supports the two's |
---|
35 | complement sample format at present. |
---|
36 | |
---|
37 | * sampleWidth is a positive integer which specifies the number of bits in a |
---|
38 | virtual sample. |
---|
39 | |
---|
40 | * channels is a positive integer which specifies the number of |
---|
41 | interleaved audio channels in the given audio track. |
---|
42 | |
---|
43 | * byteOrder is an integer which specifies the virtual byte order of |
---|
44 | samples in the given audio track. byteOrder can be either |
---|
45 | AF_BYTEORDER_BIGENDIAN or AF_BYTEORDER_LITTLEENDIAN. |
---|
46 | |
---|
47 | * slope and intercept are double-precision floating point values which |
---|
48 | indicate the audio data sample slope and zero-crossing value, |
---|
49 | respectively, for the given sample format. |
---|
50 | |
---|
51 | * minclip and maxclip are double-precision floating point values |
---|
52 | which indicates the minimum or maximum sample values to be returned. |
---|
53 | Any values less than minclip will be set to minclip, and any values |
---|
54 | greater than maxclip will be set to maxclip. |
---|
55 | |
---|
56 | RETURN VALUE |
---|
57 | |
---|
58 | These functions return 0 for success and -1 for failure. |
---|
59 | |
---|
60 | BUGS |
---|
61 | |
---|
62 | At present, afSetVirtualRate is not implemented. |
---|