1AFQUERY(3)                                                          AFQUERY(3)
2
3
4

NAME

6       afQuery, afQueryLong, afQueryDouble, afQueryPointer - query the
7       capabilities of the Audio File Library
8

SYNOPSIS

10       #include <audiofile.h>
11
12       AUpvlist afQuery (int querytype, int arg1, int arg2, int arg3, int arg4);
13
14       long afQueryLong (int querytype, int arg1, int arg2, int arg3, int arg4);
15
16       double afQueryDouble (int querytype, int arg1, int arg2, int arg3,
17           int arg4);
18
19       void *afQueryPointer (int querytype, int arg1, int arg2, int arg3,
20           int arg4);
21

PARAMETERS

23       querytype can be one of the following:
24
25       •    AF_QUERYTYPE_FILEFMT
26
27       •    AF_QUERYTYPE_INST
28
29       •    AF_QUERYTYPE_INSTPARAM
30
31       •    AF_QUERYTYPE_COMPRESSION
32
33       •    AF_QUERYTYPE_COMPRESSIONPARAM
34
35       •    AF_QUERYTYPE_MISC
36
37       •    AF_QUERYTYPE_MARK
38
39       •    AF_QUERYTYPE_LOOP
40
41       arg1, arg2, arg3, and arg4 are integer selectors whose meaning depends
42       upon querytype.
43

RETURN VALUE

45       Upon success, afQuery will return a non-null AUpvlist value. Upon
46       failure, afQuery will return null while afQueryLong and afQueryDouble
47       will return -1 and afQueryPointer will return null.
48
49       Pointers representing character strings are owned by the Audio File
50       Library and must not be freed; all other pointer values must be freed
51       by the caller.
52

DESCRIPTION

54       For AF_QUERYTYPE_FILEFMT, the following selectors are valid values for
55       arg1:
56
57       AF_QUERY_LABEL
58           Request a short label string for the format (e.g., "aiff").
59
60       AF_QUERY_NAME
61           Request a short name for the format (e.g., "MS RIFF WAVE").
62
63       AF_QUERY_DESC
64           Request a descriptive name for the format (e.g., "Audio Interchange
65           File Format").
66
67       AF_QUERY_IMPLEMENTED
68           Request a boolean value indicating whether the format is
69           implemented for reading and writing in the Audio File Library.
70
71       AF_QUERY_ID_COUNT
72           Request the total number of formats implemented.
73
74       AF_QUERY_IDS
75           Request an integer array of the id token values of all implemented
76           file formats.
77
78       AF_QUERY_COMPRESSION_TYPES
79           Used with the selector AF_QUERY_VALUE_COUNT in arg2, this will
80           return a long integer containing the number of compression schemes
81           available for use within the format specified in arg3. Used with
82           selector AF_QUERY_VALUES, it returns a pointer to an integer array
83           containing the compression id values of the compression schemes
84           supported by the format specified in arg3.
85
86       AF_QUERY_SAMPLE_FORMATS
87           Used with the selector AF_QUERY_DEFAULT in arg2, this will return
88           the default sample format for the file format specified in arg3.
89
90       AF_QUERY_SAMPLE_SIZES
91           Used with selector AF_QUERY_DEFAULT in arg2, this will return the
92           default sample width for the file format specified in arg3.
93
94       For AF_QUERYTYPE_INST, the following selectors are valid for arg1:
95
96       AF_QUERY_SUPPORTED
97           Request a boolean value indicating whether the file format in arg2
98           supports instruments.
99
100       AF_QUERY_MAX_NUMBER
101           Request an integer value indicating the maximum number of
102           instruments supported by the file format in arg2.
103
104       For AF_QUERYTYPE_INSTPARAM, the following selectors are valid for arg1:
105
106       AF_QUERY_SUPPORTED
107           Request a boolean value indicating whether the file format in arg2
108           supports instrument parameters.
109
110       AF_QUERY_ID_COUNT
111           Request an integer value indicating the number of instrument
112           parameters supported by the file format in arg2.
113
114       AF_QUERY_IDS
115           Request an integer array containing the instrument parameter values
116           for the file format in arg2.
117
118       AF_QUERY_TYPE
119           For the file format in arg2, request the type of the instrument
120           parameter in arg3.
121
122       AF_QUERY_NAME
123           For the file format in arg2, request the name of the instrument
124           parameter in arg3.
125
126       AF_QUERY_DEFAULT
127           For the file format in arg2, request the default value of the
128           instrument parameter in arg3.
129

ERRORS

131       afQuery can produce the following errors:
132
133       AF_BAD_QUERYTYPE
134           The query type is unsupported.
135
136       AF_BAD_QUERY
137           The arguments to the query are bad.
138

AUTHOR

140       Michael Pruett <michael@68k.org>
141
142
143
144Audio File Library 0.3.6          03/06/2013                        AFQUERY(3)
Impressum