| 1 |
'\" t |
| 2 |
.\" Title: afQuery |
| 3 |
.\" Author: [see the "AUTHOR" section] |
| 4 |
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> |
| 5 |
.\" Date: 03/06/2013 |
| 6 |
.\" Manual: \ \& |
| 7 |
.\" Source: Audio File Library 0.3.6 |
| 8 |
.\" Language: English |
| 9 |
.\" |
| 10 |
.TH "AFQUERY" "3" "03/06/2013" "Audio File Library 0\&.3\&.6" "\ \&" |
| 11 |
.\" ----------------------------------------------------------------- |
| 12 |
.\" * Define some portability stuff |
| 13 |
.\" ----------------------------------------------------------------- |
| 14 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 |
.\" http://bugs.debian.org/507673 |
| 16 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 17 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 |
.ie \n(.g .ds Aq \(aq |
| 19 |
.el .ds Aq ' |
| 20 |
.\" ----------------------------------------------------------------- |
| 21 |
.\" * set default formatting |
| 22 |
.\" ----------------------------------------------------------------- |
| 23 |
.\" disable hyphenation |
| 24 |
.nh |
| 25 |
.\" disable justification (adjust text to left margin only) |
| 26 |
.ad l |
| 27 |
.\" ----------------------------------------------------------------- |
| 28 |
.\" * MAIN CONTENT STARTS HERE * |
| 29 |
.\" ----------------------------------------------------------------- |
| 30 |
.SH "NAME" |
| 31 |
afQuery, afQueryLong, afQueryDouble, afQueryPointer \- query the capabilities of the Audio File Library |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.sp |
| 34 |
.nf |
| 35 |
#include <audiofile\&.h> |
| 36 |
.fi |
| 37 |
.sp |
| 38 |
.nf |
| 39 |
AUpvlist afQuery (int querytype, int arg1, int arg2, int arg3, int arg4); |
| 40 |
.fi |
| 41 |
.sp |
| 42 |
.nf |
| 43 |
long afQueryLong (int querytype, int arg1, int arg2, int arg3, int arg4); |
| 44 |
.fi |
| 45 |
.sp |
| 46 |
.nf |
| 47 |
double afQueryDouble (int querytype, int arg1, int arg2, int arg3, |
| 48 |
int arg4); |
| 49 |
.fi |
| 50 |
.sp |
| 51 |
.nf |
| 52 |
void *afQueryPointer (int querytype, int arg1, int arg2, int arg3, |
| 53 |
int arg4); |
| 54 |
.fi |
| 55 |
.SH "PARAMETERS" |
| 56 |
.sp |
| 57 |
\fIquerytype\fR can be one of the following: |
| 58 |
.sp |
| 59 |
.RS 4 |
| 60 |
.ie n \{\ |
| 61 |
\h'-04'\(bu\h'+03'\c |
| 62 |
.\} |
| 63 |
.el \{\ |
| 64 |
.sp -1 |
| 65 |
.IP \(bu 2.3 |
| 66 |
.\} |
| 67 |
|
| 68 |
AF_QUERYTYPE_FILEFMT |
| 69 |
.RE |
| 70 |
.sp |
| 71 |
.RS 4 |
| 72 |
.ie n \{\ |
| 73 |
\h'-04'\(bu\h'+03'\c |
| 74 |
.\} |
| 75 |
.el \{\ |
| 76 |
.sp -1 |
| 77 |
.IP \(bu 2.3 |
| 78 |
.\} |
| 79 |
|
| 80 |
AF_QUERYTYPE_INST |
| 81 |
.RE |
| 82 |
.sp |
| 83 |
.RS 4 |
| 84 |
.ie n \{\ |
| 85 |
\h'-04'\(bu\h'+03'\c |
| 86 |
.\} |
| 87 |
.el \{\ |
| 88 |
.sp -1 |
| 89 |
.IP \(bu 2.3 |
| 90 |
.\} |
| 91 |
|
| 92 |
AF_QUERYTYPE_INSTPARAM |
| 93 |
.RE |
| 94 |
.sp |
| 95 |
.RS 4 |
| 96 |
.ie n \{\ |
| 97 |
\h'-04'\(bu\h'+03'\c |
| 98 |
.\} |
| 99 |
.el \{\ |
| 100 |
.sp -1 |
| 101 |
.IP \(bu 2.3 |
| 102 |
.\} |
| 103 |
|
| 104 |
AF_QUERYTYPE_COMPRESSION |
| 105 |
.RE |
| 106 |
.sp |
| 107 |
.RS 4 |
| 108 |
.ie n \{\ |
| 109 |
\h'-04'\(bu\h'+03'\c |
| 110 |
.\} |
| 111 |
.el \{\ |
| 112 |
.sp -1 |
| 113 |
.IP \(bu 2.3 |
| 114 |
.\} |
| 115 |
|
| 116 |
AF_QUERYTYPE_COMPRESSIONPARAM |
| 117 |
.RE |
| 118 |
.sp |
| 119 |
.RS 4 |
| 120 |
.ie n \{\ |
| 121 |
\h'-04'\(bu\h'+03'\c |
| 122 |
.\} |
| 123 |
.el \{\ |
| 124 |
.sp -1 |
| 125 |
.IP \(bu 2.3 |
| 126 |
.\} |
| 127 |
|
| 128 |
AF_QUERYTYPE_MISC |
| 129 |
.RE |
| 130 |
.sp |
| 131 |
.RS 4 |
| 132 |
.ie n \{\ |
| 133 |
\h'-04'\(bu\h'+03'\c |
| 134 |
.\} |
| 135 |
.el \{\ |
| 136 |
.sp -1 |
| 137 |
.IP \(bu 2.3 |
| 138 |
.\} |
| 139 |
|
| 140 |
AF_QUERYTYPE_MARK |
| 141 |
.RE |
| 142 |
.sp |
| 143 |
.RS 4 |
| 144 |
.ie n \{\ |
| 145 |
\h'-04'\(bu\h'+03'\c |
| 146 |
.\} |
| 147 |
.el \{\ |
| 148 |
.sp -1 |
| 149 |
.IP \(bu 2.3 |
| 150 |
.\} |
| 151 |
|
| 152 |
AF_QUERYTYPE_LOOP |
| 153 |
.RE |
| 154 |
.sp |
| 155 |
\fIarg1\fR, \fIarg2\fR, \fIarg3\fR, and \fIarg4\fR are integer selectors whose meaning depends upon \fIquerytype\fR\&. |
| 156 |
.SH "RETURN VALUE" |
| 157 |
.sp |
| 158 |
Upon success, afQuery will return a non\-null AUpvlist value\&. Upon failure, afQuery will return null while afQueryLong and afQueryDouble will return \-1 and afQueryPointer will return null\&. |
| 159 |
.sp |
| 160 |
Pointers representing character strings are owned by the Audio File Library and must not be freed; all other pointer values must be freed by the caller\&. |
| 161 |
.SH "DESCRIPTION" |
| 162 |
.sp |
| 163 |
For AF_QUERYTYPE_FILEFMT, the following selectors are valid values for \fIarg1\fR: |
| 164 |
.PP |
| 165 |
AF_QUERY_LABEL |
| 166 |
.RS 4 |
| 167 |
Request a short label string for the format (e\&.g\&., "aiff")\&. |
| 168 |
.RE |
| 169 |
.PP |
| 170 |
AF_QUERY_NAME |
| 171 |
.RS 4 |
| 172 |
Request a short name for the format (e\&.g\&., "MS RIFF WAVE")\&. |
| 173 |
.RE |
| 174 |
.PP |
| 175 |
AF_QUERY_DESC |
| 176 |
.RS 4 |
| 177 |
Request a descriptive name for the format (e\&.g\&., "Audio Interchange File Format")\&. |
| 178 |
.RE |
| 179 |
.PP |
| 180 |
AF_QUERY_IMPLEMENTED |
| 181 |
.RS 4 |
| 182 |
Request a boolean value indicating whether the format is implemented for reading and writing in the Audio File Library\&. |
| 183 |
.RE |
| 184 |
.PP |
| 185 |
AF_QUERY_ID_COUNT |
| 186 |
.RS 4 |
| 187 |
Request the total number of formats implemented\&. |
| 188 |
.RE |
| 189 |
.PP |
| 190 |
AF_QUERY_IDS |
| 191 |
.RS 4 |
| 192 |
Request an integer array of the id token values of all implemented file formats\&. |
| 193 |
.RE |
| 194 |
.PP |
| 195 |
AF_QUERY_COMPRESSION_TYPES |
| 196 |
.RS 4 |
| 197 |
Used with the selector AF_QUERY_VALUE_COUNT in |
| 198 |
\fIarg2\fR, this will return a long integer containing the number of compression schemes available for use within the format specified in |
| 199 |
\fIarg3\fR\&. Used with selector |
| 200 |
AF_QUERY_VALUES, it returns a pointer to an integer array containing the compression id values of the compression schemes supported by the format specified in |
| 201 |
\fIarg3\fR\&. |
| 202 |
.RE |
| 203 |
.PP |
| 204 |
AF_QUERY_SAMPLE_FORMATS |
| 205 |
.RS 4 |
| 206 |
Used with the selector AF_QUERY_DEFAULT in |
| 207 |
\fIarg2\fR, this will return the default sample format for the file format specified in |
| 208 |
\fIarg3\fR\&. |
| 209 |
.RE |
| 210 |
.PP |
| 211 |
AF_QUERY_SAMPLE_SIZES |
| 212 |
.RS 4 |
| 213 |
Used with selector AF_QUERY_DEFAULT in |
| 214 |
\fIarg2\fR, this will return the default sample width for the file format specified in |
| 215 |
\fIarg3\fR\&. |
| 216 |
.RE |
| 217 |
.sp |
| 218 |
For AF_QUERYTYPE_INST, the following selectors are valid for \fIarg1\fR: |
| 219 |
.PP |
| 220 |
AF_QUERY_SUPPORTED |
| 221 |
.RS 4 |
| 222 |
Request a boolean value indicating whether the file format in |
| 223 |
\fIarg2\fR |
| 224 |
supports instruments\&. |
| 225 |
.RE |
| 226 |
.PP |
| 227 |
AF_QUERY_MAX_NUMBER |
| 228 |
.RS 4 |
| 229 |
Request an integer value indicating the maximum number of instruments supported by the file format in |
| 230 |
\fIarg2\fR\&. |
| 231 |
.RE |
| 232 |
.sp |
| 233 |
For AF_QUERYTYPE_INSTPARAM, the following selectors are valid for \fIarg1\fR: |
| 234 |
.PP |
| 235 |
AF_QUERY_SUPPORTED |
| 236 |
.RS 4 |
| 237 |
Request a boolean value indicating whether the file format in |
| 238 |
\fIarg2\fR |
| 239 |
supports instrument parameters\&. |
| 240 |
.RE |
| 241 |
.PP |
| 242 |
AF_QUERY_ID_COUNT |
| 243 |
.RS 4 |
| 244 |
Request an integer value indicating the number of instrument parameters supported by the file format in |
| 245 |
\fIarg2\fR\&. |
| 246 |
.RE |
| 247 |
.PP |
| 248 |
AF_QUERY_IDS |
| 249 |
.RS 4 |
| 250 |
Request an integer array containing the instrument parameter values for the file format in |
| 251 |
\fIarg2\fR\&. |
| 252 |
.RE |
| 253 |
.PP |
| 254 |
AF_QUERY_TYPE |
| 255 |
.RS 4 |
| 256 |
For the file format in |
| 257 |
\fIarg2\fR, request the type of the instrument parameter in |
| 258 |
\fIarg3\fR\&. |
| 259 |
.RE |
| 260 |
.PP |
| 261 |
AF_QUERY_NAME |
| 262 |
.RS 4 |
| 263 |
For the file format in |
| 264 |
\fIarg2\fR, request the name of the instrument parameter in |
| 265 |
\fIarg3\fR\&. |
| 266 |
.RE |
| 267 |
.PP |
| 268 |
AF_QUERY_DEFAULT |
| 269 |
.RS 4 |
| 270 |
For the file format in |
| 271 |
\fIarg2\fR, request the default value of the instrument parameter in |
| 272 |
\fIarg3\fR\&. |
| 273 |
.RE |
| 274 |
.SH "ERRORS" |
| 275 |
.sp |
| 276 |
afQuery can produce the following errors: |
| 277 |
.PP |
| 278 |
AF_BAD_QUERYTYPE |
| 279 |
.RS 4 |
| 280 |
The query type is unsupported\&. |
| 281 |
.RE |
| 282 |
.PP |
| 283 |
AF_BAD_QUERY |
| 284 |
.RS 4 |
| 285 |
The arguments to the query are bad\&. |
| 286 |
.RE |
| 287 |
.SH "AUTHOR" |
| 288 |
.sp |
| 289 |
Michael Pruett <michael@68k\&.org> |