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