| 1 |
afSetVirtualSampleFormat(3) |
| 2 |
=========================== |
| 3 |
|
| 4 |
NAME |
| 5 |
---- |
| 6 |
afSetVirtualByteOrder, afSetVirtualChannels, afSetVirtualPCMMapping, |
| 7 |
afSetVirtualSampleFormat - set the virtual data format for a track in |
| 8 |
an audio file |
| 9 |
|
| 10 |
SYNOPSIS |
| 11 |
-------- |
| 12 |
#include <audiofile.h> |
| 13 |
|
| 14 |
int afSetVirtualByteOrder (AFfilehandle file, int track, int byteOrder); |
| 15 |
|
| 16 |
int afSetVirtualChannels (AFfilehandle file, int track, int channels); |
| 17 |
|
| 18 |
int afSetVirtualSampleFormat (AFfilehandle file, int track, |
| 19 |
int sampleFormat, int sampleWidth); |
| 20 |
|
| 21 |
int afSetVirtualPCMMapping (AFfilehandle file, int track, |
| 22 |
double slope, double intercept, double minclip, double maxclip); |
| 23 |
|
| 24 |
PARAMETERS |
| 25 |
---------- |
| 26 |
* 'file' is an AFfilehandle which refers to an open audio file and is |
| 27 |
usually created by afOpenFile. |
| 28 |
|
| 29 |
* 'track' is an integer which identifies a particular track in an open |
| 30 |
audio file. The only valid track is `AF_DEFAULT_TRACK` for all |
| 31 |
currently supported file formats. |
| 32 |
|
| 33 |
* 'sampleFormat' is an integer which denotes a virtual sample format. |
| 34 |
Valid values are `AF_SAMPFMT_TWOSCOMP`, `AF_SAMPFMT_UNSIGNED`, |
| 35 |
`AF_SAMPFMT_FLOAT`, and `AF_SAMPFMT_DOUBLE`. |
| 36 |
|
| 37 |
* 'sampleWidth' is a positive integer which specifies the number of bits |
| 38 |
in a 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 |
AUTHOR |
| 61 |
------ |
| 62 |
Michael Pruett <[email protected]> |