annotate src/libsndfile-1.0.27/doc/command.html @ 125:cd6cdf86811e

Current libsndfile source
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 18 Oct 2016 13:22:47 +0100
parents
children
rev   line source
cannam@125 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
cannam@125 2 <HTML>
cannam@125 3
cannam@125 4 <HEAD>
cannam@125 5 <TITLE>
cannam@125 6 libsndfile : the sf_command function.
cannam@125 7 </TITLE>
cannam@125 8 <META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
cannam@125 9 <!-- Another version at the bottom of the page. -->
cannam@125 10 <META NAME="Description" CONTENT="The libsndfile API.">
cannam@125 11 <META NAME="Keywords" CONTENT="WAV AIFF AU libsndfile sound audio dsp Linux">
cannam@125 12 <LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
cannam@125 13 <LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
cannam@125 14 </HEAD>
cannam@125 15
cannam@125 16 <BODY>
cannam@125 17
cannam@125 18 <H1><B>sf_command</B></H1>
cannam@125 19 <PRE>
cannam@125 20
cannam@125 21 int sf_command (SNDFILE *sndfile, int cmd, void *data, int datasize) ;
cannam@125 22 </PRE>
cannam@125 23 <P>
cannam@125 24 This function allows the caller to retrieve information from or change aspects of the
cannam@125 25 library behaviour.
cannam@125 26 Examples include retrieving a string containing the library version or changing the
cannam@125 27 scaling applied to floating point sample data during read and write.
cannam@125 28 Most of these operations are performed on a per-file basis.
cannam@125 29 </P>
cannam@125 30 <P>
cannam@125 31 The cmd parameter is an integer identifier which is defined in &lt;sndfile.h&gt;.
cannam@125 32 All of the valid command identifiers have names beginning with "SFC_".
cannam@125 33 Data is passed to and returned from the library by use of a void pointer.
cannam@125 34 The library will not read or write more than datasize bytes from the void pointer.
cannam@125 35 For some calls no data is required in which case data should be NULL and datasize
cannam@125 36 may be used for some other purpose.
cannam@125 37 </P>
cannam@125 38 <P>
cannam@125 39 The available commands are as follows:
cannam@125 40 </P>
cannam@125 41
cannam@125 42 <CENTER>
cannam@125 43 <TABLE BORDER="0" WIDTH="90%" CELLPADDING="4">
cannam@125 44 <TR>
cannam@125 45 <TD><A HREF="#SFC_GET_LIB_VERSION">SFC_GET_LIB_VERSION</A></TD>
cannam@125 46 <TD>Retrieve the version of the library.</TD>
cannam@125 47 </TR>
cannam@125 48 <TR>
cannam@125 49 <TD><A HREF="#SFC_GET_LOG_INFO">SFC_GET_LOG_INFO</A></TD>
cannam@125 50 <TD>Retrieve the internal per-file operation log.</TD>
cannam@125 51 </TR>
cannam@125 52 <TR>
cannam@125 53 <TD><A HREF="#SFC_CALC_SIGNAL_MAX">SFC_CALC_SIGNAL_MAX</A></TD>
cannam@125 54 <TD>Calculate the measured maximum signal value.</TD>
cannam@125 55 </TR>
cannam@125 56 <TR>
cannam@125 57 <TD><A HREF="#SFC_CALC_NORM_SIGNAL_MAX">SFC_CALC_NORM_SIGNAL_MAX</A></TD>
cannam@125 58 <TD>Calculate the measured normalised maximum signal value.</TD>
cannam@125 59 </TR>
cannam@125 60 <TR>
cannam@125 61 <TD><A HREF="#SFC_CALC_MAX_ALL_CHANNELS">SFC_CALC_MAX_ALL_CHANNELS</A></TD>
cannam@125 62 <TD>Calculate the peak value for each channel.</TD>
cannam@125 63 </TR>
cannam@125 64 <TR>
cannam@125 65 <TD><A HREF="#SFC_CALC_NORM_MAX_ALL_CHANNELS">SFC_CALC_NORM_MAX_ALL_CHANNELS</A></TD>
cannam@125 66 <TD>Calculate the normalised peak for each channel.</TD>
cannam@125 67 </TR>
cannam@125 68
cannam@125 69 <TR>
cannam@125 70 <TD><A HREF="#SFC_GET_SIGNAL_MAX">SFC_GET_SIGNAL_MAX</A></TD>
cannam@125 71 <TD>Retrieve the peak value for the file (as stored in the file header).</TD>
cannam@125 72 </TR>
cannam@125 73 <TR>
cannam@125 74 <TD><A HREF="#SFC_GET_MAX_ALL_CHANNELS">SFC_GET_MAX_ALL_CHANNELS</A></TD>
cannam@125 75 <TD>Retrieve the peak value for each channel (as stored in the file header).</TD>
cannam@125 76 </TR>
cannam@125 77
cannam@125 78 <TR>
cannam@125 79 <TD><A HREF="#SFC_SET_NORM_FLOAT">SFC_SET_NORM_FLOAT</A></TD>
cannam@125 80 <TD>Modify the normalisation behaviour of the floating point reading and writing functions.</TD>
cannam@125 81 </TR>
cannam@125 82 <TR>
cannam@125 83 <TD><A HREF="#SFC_SET_NORM_DOUBLE">SFC_SET_NORM_DOUBLE</A></TD>
cannam@125 84 <TD>Modify the normalisation behaviour of the double precision floating point reading and writing functions.</TD>
cannam@125 85 </TR>
cannam@125 86 <TR>
cannam@125 87 <TD><A HREF="#SFC_GET_NORM_FLOAT">SFC_GET_NORM_FLOAT</A></TD>
cannam@125 88 <TD>Retrieve the current normalisation behaviour of the floating point reading and writing functions.</TD>
cannam@125 89 </TR>
cannam@125 90 <TR>
cannam@125 91 <TD><A HREF="#SFC_GET_NORM_DOUBLE">SFC_GET_NORM_DOUBLE</A></TD>
cannam@125 92 <TD>Retrieve the current normalisation behaviour of the double precision floating point reading and writing functions.</TD>
cannam@125 93 </TR>
cannam@125 94 <TR>
cannam@125 95 <TD><A HREF="#SFC_SET_SCALE_FLOAT_INT_READ">SFC_SET_SCALE_FLOAT_INT_READ</A></TD>
cannam@125 96 <TD>Set/clear the scale factor when integer (short/int) data is read from a file
cannam@125 97 containing floating point data.</TD>
cannam@125 98 </TR>
cannam@125 99
cannam@125 100 <TR>
cannam@125 101 <TD><A HREF="#SFC_SET_SCALE_INT_FLOAT_WRITE">SFC_SET_SCALE_INT_FLOAT_WRITE</A></TD>
cannam@125 102 <TD>Set/clear the scale factor when integer (short/int) data is written to a file
cannam@125 103 as floating point data.</TD>
cannam@125 104 </TR>
cannam@125 105
cannam@125 106 <TR>
cannam@125 107 <TD><A HREF="#SFC_GET_SIMPLE_FORMAT_COUNT">SFC_GET_SIMPLE_FORMAT_COUNT</A></TD>
cannam@125 108 <TD>Retrieve the number of simple formats supported by libsndfile.</TD>
cannam@125 109 </TR>
cannam@125 110 <TR>
cannam@125 111 <TD><A HREF="#SFC_GET_SIMPLE_FORMAT">SFC_GET_SIMPLE_FORMAT</A></TD>
cannam@125 112 <TD>Retrieve information about a simple format.</TD>
cannam@125 113 </TR>
cannam@125 114
cannam@125 115 <TR>
cannam@125 116 <TD><A HREF="#SFC_GET_FORMAT_INFO">SFC_GET_FORMAT_INFO</A></TD>
cannam@125 117 <TD>Retrieve information about a major or subtype format.</TD>
cannam@125 118 </TR>
cannam@125 119
cannam@125 120 <TR>
cannam@125 121 <TD><A HREF="#SFC_GET_FORMAT_MAJOR_COUNT">SFC_GET_FORMAT_MAJOR_COUNT</A></TD>
cannam@125 122 <TD>Retrieve the number of major formats.</TD>
cannam@125 123 </TR>
cannam@125 124 <TR>
cannam@125 125 <TD><A HREF="#SFC_GET_FORMAT_MAJOR">SFC_GET_FORMAT_MAJOR</A></TD>
cannam@125 126 <TD>Retrieve information about a major format type.</TD>
cannam@125 127 </TR>
cannam@125 128 <TR>
cannam@125 129 <TD><A HREF="#SFC_GET_FORMAT_SUBTYPE_COUNT">SFC_GET_FORMAT_SUBTYPE_COUNT</A></TD>
cannam@125 130 <TD>Retrieve the number of subformats.</TD>
cannam@125 131 </TR>
cannam@125 132 <TR>
cannam@125 133 <TD><A HREF="#SFC_GET_FORMAT_SUBTYPE">SFC_GET_FORMAT_SUBTYPE</A></TD>
cannam@125 134 <TD>Retrieve information about a subformat.</TD>
cannam@125 135 </TR>
cannam@125 136
cannam@125 137 <TR>
cannam@125 138 <TD><A HREF="#SFC_SET_ADD_PEAK_CHUNK">SFC_SET_ADD_PEAK_CHUNK</A></TD>
cannam@125 139 <TD>Switch the code for adding the PEAK chunk to WAV and AIFF files on or off.</TD>
cannam@125 140 </TR>
cannam@125 141
cannam@125 142 <TR>
cannam@125 143 <TD><A HREF="#SFC_UPDATE_HEADER_NOW">SFC_UPDATE_HEADER_NOW</A></TD>
cannam@125 144 <TD>Used when a file is open for write, this command will update the file
cannam@125 145 header to reflect the data written so far.</TD>
cannam@125 146 </TR>
cannam@125 147 <TR>
cannam@125 148 <TD><A HREF="#SFC_SET_UPDATE_HEADER_AUTO">SFC_SET_UPDATE_HEADER_AUTO</A></TD>
cannam@125 149 <TD>Used when a file is open for write, this command will cause the file header
cannam@125 150 to be updated after each write to the file.</TD>
cannam@125 151 </TR>
cannam@125 152
cannam@125 153 <TR>
cannam@125 154 <TD><A HREF="#SFC_FILE_TRUNCATE">SFC_FILE_TRUNCATE</A></TD>
cannam@125 155 <TD>Truncate a file open for write or for read/write.</TD>
cannam@125 156 </TR>
cannam@125 157
cannam@125 158 <TR>
cannam@125 159 <TD><A HREF="#SFC_SET_RAW_START_OFFSET">SFC_SET_RAW_START_OFFSET</A></TD>
cannam@125 160 <TD>Change the data start offset for files opened up as SF_FORMAT_RAW.</TD>
cannam@125 161 </TR>
cannam@125 162
cannam@125 163 <TR>
cannam@125 164 <TD><A HREF="#SFC_SET_CLIPPING">SFC_SET_CLIPPING</A></TD>
cannam@125 165 <TD>Turn on/off automatic clipping when doing floating point to integer
cannam@125 166 conversion.</TD>
cannam@125 167 </TR>
cannam@125 168
cannam@125 169 <TR>
cannam@125 170 <TD><A HREF="#SFC_GET_CLIPPING">SFC_GET_CLIPPING</A></TD>
cannam@125 171 <TD>Retrieve current clipping setting.</TD>
cannam@125 172 </TR>
cannam@125 173
cannam@125 174 <TR>
cannam@125 175 <TD><A HREF="#SFC_GET_EMBED_FILE_INFO">SFC_GET_EMBED_FILE_INFO</A></TD>
cannam@125 176 <TD>Retrieve information about audio files embedded inside other files.</TD>
cannam@125 177 </TR>
cannam@125 178
cannam@125 179 <TR>
cannam@125 180 <TD><A HREF="#SFC_WAVEX_GET_AMBISONIC">SFC_GET_AMBISONIC</A></TD>
cannam@125 181 <TD>Test a WAVEX file for Ambisonic format</TD>
cannam@125 182 </TR>
cannam@125 183
cannam@125 184 <TR>
cannam@125 185 <TD><A HREF="#SFC_WAVEX_SET_AMBISONIC">SFC_SET_AMBISONIC</A></TD>
cannam@125 186 <TD>Modify a WAVEX header for Ambisonic format</TD>
cannam@125 187 </TR>
cannam@125 188
cannam@125 189 <TR>
cannam@125 190 <TD><A HREF="#SFC_SET_VBR_ENCODING_QUALITY">SFC_SET_VBR_ENCODING_QUALITY</A></TD>
cannam@125 191 <TD>Set the Variable Bit Rate encoding quality</TD>
cannam@125 192 </TR>
cannam@125 193
cannam@125 194 <TR>
cannam@125 195 <TD><A HREF="#SFC_SET_COMPRESSION_LEVEL">SFC_SET_COMPRESSION_LEVEL</A></TD>
cannam@125 196 <TD>Set the compression level.</TD>
cannam@125 197 </TR>
cannam@125 198
cannam@125 199 <TR>
cannam@125 200 <TD><A HREF="#SFC_RAW_NEEDS_ENDSWAP">SFC_RAW_NEEDS_ENDSWAP</a></td>
cannam@125 201 <TD>Determine if raw data needs endswapping</TD>
cannam@125 202 </TR>
cannam@125 203
cannam@125 204 <TR>
cannam@125 205 <TD><A HREF="#SFC_GET_BROADCAST_INFO">SFC_GET_BROADCAST_INFO</A></TD>
cannam@125 206 <TD>Retrieve the Broadcast Chunk info</TD>
cannam@125 207 </TR>
cannam@125 208
cannam@125 209 <TR>
cannam@125 210 <TD><A HREF="#SFC_SET_BROADCAST_INFO">SFC_SET_BROADCAST_INFO</A></TD>
cannam@125 211 <TD>Set the Broadcast Chunk info</TD>
cannam@125 212 </TR>
cannam@125 213
cannam@125 214 <TR>
cannam@125 215 <TD><A HREF="#SFC_SET_CART_INFO">SFC_SET_CART_INFO</A></TD>
cannam@125 216 <TD>Set the Cart Chunk info</TD>
cannam@125 217 </TR>
cannam@125 218
cannam@125 219 <TR>
cannam@125 220 <TD><A HREF="#SFC_GET_CART_INFO">SFC_GET_CART_INFO</A></TD>
cannam@125 221 <TD>Retrieve the Cart Chunk info</TD>
cannam@125 222 </TR>
cannam@125 223
cannam@125 224 <TR>
cannam@125 225 <TD><A HREF="#SFC_GET_LOOP_INFO">SFC_GET_LOOP_INFO</A></TD>
cannam@125 226 <TD>Get loop info</TD>
cannam@125 227 </TR>
cannam@125 228
cannam@125 229 <TR>
cannam@125 230 <TD><A HREF="#SFC_GET_INSTRUMENT">SFC_GET_INSTRUMENT</A></TD>
cannam@125 231 <TD>Get instrument info</TD>
cannam@125 232 </TR>
cannam@125 233
cannam@125 234 <TR>
cannam@125 235 <TD><A HREF="#SFC_SET_INSTRUMENT">SFC_SET_INSTRUMENT</A></TD>
cannam@125 236 <TD>Set instrument info</TD>
cannam@125 237 </TR>
cannam@125 238
cannam@125 239 <TR>
cannam@125 240 <TD><A HREF="#SFC_GET_CUE_COUNT">SFC_GET_CUE_COUNT</A></TD>
cannam@125 241 <TD>Get the cue marker count</TD>
cannam@125 242 </TR>
cannam@125 243
cannam@125 244 <TR>
cannam@125 245 <TD><A HREF="#SFC_GET_CUE">SFC_GET_CUE</A></TD>
cannam@125 246 <TD>Get cue marker info</TD>
cannam@125 247 </TR>
cannam@125 248
cannam@125 249 <TR>
cannam@125 250 <TD><A HREF="#SFC_SET_CUE">SFC_SET_CUE</A></TD>
cannam@125 251 <TD>Set cue marker info</TD>
cannam@125 252 </TR>
cannam@125 253
cannam@125 254 <TR>
cannam@125 255 <TD><A HREF="#SFC_RF64_AUTO_DOWNGRADE">SFC_RF64_AUTO_DOWNGRADE</A></TD>
cannam@125 256 <TD>Enable auto downgrade from RF64 to WAV</TD>
cannam@125 257 </TR>
cannam@125 258
cannam@125 259 <!--
cannam@125 260 <TR>
cannam@125 261 <TD><A HREF="#add-dither">add dither</A></TD>
cannam@125 262 <TD>Add dither to output on write.</TD>
cannam@125 263 </TR>
cannam@125 264 -->
cannam@125 265 </TABLE>
cannam@125 266 </CENTER>
cannam@125 267
cannam@125 268 <BR><BR>
cannam@125 269
cannam@125 270 <HR>
cannam@125 271
cannam@125 272 <!-- ========================================================================= -->
cannam@125 273 <A NAME="SFC_GET_LIB_VERSION"></A>
cannam@125 274 <H2><BR><B>SFC_GET_LIB_VERSION</B></H2>
cannam@125 275 <P>
cannam@125 276 Retrieve the version of the library as a string.
cannam@125 277 </P>
cannam@125 278 <P>
cannam@125 279 Parameters:
cannam@125 280 <PRE>
cannam@125 281 sndfile : Not used
cannam@125 282 cmd : SFC_GET_LIB_VERSION
cannam@125 283 data : A pointer to a char buffer
cannam@125 284 datasize : The size of the buffer
cannam@125 285 </PRE>
cannam@125 286 <P>
cannam@125 287 Example:
cannam@125 288 </P>
cannam@125 289 <PRE>
cannam@125 290 char buffer [128] ;
cannam@125 291 sf_command (NULL, SFC_GET_LIB_VERSION, buffer, sizeof (buffer)) ;
cannam@125 292 </PRE>
cannam@125 293
cannam@125 294 <DL>
cannam@125 295 <DT>Return value:</DT>
cannam@125 296 <DD><DD>This call will return the length of the retrieved version string.
cannam@125 297 </DL>
cannam@125 298 <DL>
cannam@125 299 <DT>Notes:</DT>
cannam@125 300 <DD>
cannam@125 301 The string returned in the buffer passed to this function will not overflow
cannam@125 302 the buffer and will always be null terminated .
cannam@125 303 </DL>
cannam@125 304
cannam@125 305 <!-- ========================================================================= -->
cannam@125 306 <A NAME="SFC_GET_LOG_INFO"></A>
cannam@125 307 <H2><BR><B>SFC_GET_LOG_INFO</B></H2>
cannam@125 308 <P>
cannam@125 309 Retrieve the log buffer generated when opening a file as a string. This log
cannam@125 310 buffer can often contain a good reason for why libsndfile failed to open a
cannam@125 311 particular file.
cannam@125 312 </P>
cannam@125 313 <P>
cannam@125 314 Parameters:
cannam@125 315 <PRE>
cannam@125 316 sndfile : A valid SNDFILE* pointer
cannam@125 317 cmd : SFC_GET_LOG_INFO
cannam@125 318 data : A pointer to a char buffer
cannam@125 319 datasize : The size of the buffer
cannam@125 320 </PRE>
cannam@125 321 <P>
cannam@125 322 Example:
cannam@125 323 </P>
cannam@125 324 <PRE>
cannam@125 325 char buffer [2048] ;
cannam@125 326 sf_command (sndfile, SFC_GET_LOG_INFO, buffer, sizeof (buffer)) ;
cannam@125 327 </PRE>
cannam@125 328
cannam@125 329 <DL>
cannam@125 330 <DT>Return value:</DT>
cannam@125 331 <DD><DD>This call will return the length of the retrieved version string.
cannam@125 332 </DL>
cannam@125 333 <DL>
cannam@125 334 <DT>Notes:</DT>
cannam@125 335 <DD>
cannam@125 336 The string returned in the buffer passed to this function will not overflow
cannam@125 337 the buffer and will always be null terminated .
cannam@125 338 </DL>
cannam@125 339
cannam@125 340 <!-- ========================================================================= -->
cannam@125 341 <A NAME="SFC_CALC_SIGNAL_MAX"></A>
cannam@125 342 <H2><BR><B>SFC_CALC_SIGNAL_MAX</B></H2>
cannam@125 343 <P>
cannam@125 344 Retrieve the measured maximum signal value. This involves reading through
cannam@125 345 the whole file which can be slow on large files.
cannam@125 346 </P>
cannam@125 347 <P>
cannam@125 348 Parameters:
cannam@125 349 <PRE>
cannam@125 350 sndfile : A valid SNDFILE* pointer
cannam@125 351 cmd : SFC_CALC_SIGNAL_MAX
cannam@125 352 data : A pointer to a double
cannam@125 353 datasize : sizeof (double)
cannam@125 354 </PRE>
cannam@125 355 <P>
cannam@125 356 Example:
cannam@125 357 </P>
cannam@125 358 <PRE>
cannam@125 359 double max_val ;
cannam@125 360 sf_command (sndfile, SFC_CALC_SIGNAL_MAX, &amp;max_val, sizeof (max_val)) ;
cannam@125 361 </PRE>
cannam@125 362
cannam@125 363 <DL>
cannam@125 364 <DT>Return value:</DT>
cannam@125 365 <DD><DD>Zero on success, non-zero otherwise.
cannam@125 366 </DL>
cannam@125 367
cannam@125 368 <!-- ========================================================================= -->
cannam@125 369 <A NAME="SFC_CALC_NORM_SIGNAL_MAX"></A>
cannam@125 370 <H2><BR><B>SFC_CALC_NORM_SIGNAL_MAX</B></H2>
cannam@125 371 <P>
cannam@125 372 Retrieve the measured normalised maximum signal value. This involves reading
cannam@125 373 through the whole file which can be slow on large files.
cannam@125 374 </P>
cannam@125 375 <P>
cannam@125 376 Parameters:
cannam@125 377 <PRE>
cannam@125 378 sndfile : A valid SNDFILE* pointer
cannam@125 379 cmd : SFC_CALC_NORM_SIGNAL_MAX
cannam@125 380 data : A pointer to a double
cannam@125 381 datasize : sizeof (double)
cannam@125 382 </PRE>
cannam@125 383 <P>
cannam@125 384 Example:
cannam@125 385 </P>
cannam@125 386 <PRE>
cannam@125 387 double max_val ;
cannam@125 388 sf_command (sndfile, SFC_CALC_NORM_SIGNAL_MAX, &amp;max_val, sizeof (max_val)) ;
cannam@125 389 </PRE>
cannam@125 390
cannam@125 391 <DL>
cannam@125 392 <DT>Return value:</DT>
cannam@125 393 <DD><DD>Zero on success, non-zero otherwise.
cannam@125 394 </DL>
cannam@125 395
cannam@125 396 <!-- ========================================================================= -->
cannam@125 397 <A NAME="SFC_CALC_MAX_ALL_CHANNELS"></A>
cannam@125 398 <H2><BR><B>SFC_CALC_MAX_ALL_CHANNELS</B></H2>
cannam@125 399 <P>
cannam@125 400 Calculate the peak value (ie a single number) for each channel.
cannam@125 401 This involves reading through the whole file which can be slow on large files.
cannam@125 402 </P>
cannam@125 403 <P>
cannam@125 404 Parameters:
cannam@125 405 <PRE>
cannam@125 406 sndfile : A valid SNDFILE* pointer
cannam@125 407 cmd : SFC_CALC_MAX_ALL_CHANNELS
cannam@125 408 data : A pointer to a double
cannam@125 409 datasize : sizeof (double) * number_of_channels
cannam@125 410 </PRE>
cannam@125 411 <P>
cannam@125 412 Example:
cannam@125 413 </P>
cannam@125 414 <PRE>
cannam@125 415 double peaks [number_of_channels] ;
cannam@125 416 sf_command (sndfile, SFC_CALC_MAX_ALL_CHANNELS, peaks, sizeof (peaks)) ;
cannam@125 417 </PRE>
cannam@125 418 <DL>
cannam@125 419 <DT>Return value:</DT>
cannam@125 420 <DD>Zero if peaks have been calculated successfully and non-zero otherwise.
cannam@125 421 </DL>
cannam@125 422
cannam@125 423
cannam@125 424 <!-- ========================================================================= -->
cannam@125 425 <A NAME="SFC_CALC_NORM_MAX_ALL_CHANNELS"></A>
cannam@125 426 <H2><BR><B>SFC_CALC_NORM_MAX_ALL_CHANNELS</B></H2>
cannam@125 427 <P>
cannam@125 428 Calculate the normalised peak for each channel.
cannam@125 429 This involves reading through the whole file which can be slow on large files.
cannam@125 430 </P>
cannam@125 431 <P>
cannam@125 432 Parameters:
cannam@125 433 <PRE>
cannam@125 434 sndfile : A valid SNDFILE* pointer
cannam@125 435 cmd : SFC_CALC_NORM_MAX_ALL_CHANNELS
cannam@125 436 data : A pointer to a double
cannam@125 437 datasize : sizeof (double) * number_of_channels
cannam@125 438 </PRE>
cannam@125 439 <P>
cannam@125 440 Example:
cannam@125 441 </P>
cannam@125 442 <PRE>
cannam@125 443 double peaks [number_of_channels] ;
cannam@125 444 sf_command (sndfile, SFC_CALC_NORM_MAX_ALL_CHANNELS, peaks, sizeof (peaks)) ;
cannam@125 445 </PRE>
cannam@125 446 <DL>
cannam@125 447 <DT>Return value:</DT>
cannam@125 448 <DD>Zero if peaks have been calculated successfully and non-zero otherwise.
cannam@125 449 </DL>
cannam@125 450
cannam@125 451
cannam@125 452
cannam@125 453
cannam@125 454 <!-- ========================================================================= -->
cannam@125 455 <A NAME="SFC_GET_SIGNAL_MAX"></A>
cannam@125 456 <H2><BR><B>SFC_GET_SIGNAL_MAX</B></H2>
cannam@125 457 <P>
cannam@125 458 Retrieve the peak value for the file as stored in the file header.
cannam@125 459 </P>
cannam@125 460 <P>
cannam@125 461 Parameters:
cannam@125 462 <PRE>
cannam@125 463 sndfile : A valid SNDFILE* pointer
cannam@125 464 cmd : SFC_GET_SIGNAL_MAX
cannam@125 465 data : A pointer to a double
cannam@125 466 datasize : sizeof (double)
cannam@125 467 </PRE>
cannam@125 468 <P>
cannam@125 469 Example:
cannam@125 470 </P>
cannam@125 471 <PRE>
cannam@125 472 double max_peak ;
cannam@125 473 sf_command (sndfile, SFC_GET_SIGNAL_MAX, &amp;max_peak, sizeof (max_peak)) ;
cannam@125 474 </PRE>
cannam@125 475 <DL>
cannam@125 476 <DT>Return value:</DT>
cannam@125 477 <DD>SF_TRUE if the file header contained the peak value. SF_FALSE otherwise.
cannam@125 478 </DL>
cannam@125 479
cannam@125 480 <!-- ========================================================================= -->
cannam@125 481 <A NAME="SFC_GET_MAX_ALL_CHANNELS"></A>
cannam@125 482 <H2><BR><B>SFC_GET_MAX_ALL_CHANNELS</B></H2>
cannam@125 483 <P>
cannam@125 484 Retrieve the peak value for the file as stored in the file header.
cannam@125 485 </P>
cannam@125 486 <P>
cannam@125 487 Parameters:
cannam@125 488 <PRE>
cannam@125 489 sndfile : A valid SNDFILE* pointer
cannam@125 490 cmd : SFC_GET_SIGNAL_MAX
cannam@125 491 data : A pointer to an array of doubles
cannam@125 492 datasize : sizeof (double) * number_of_channels
cannam@125 493 </PRE>
cannam@125 494 <P>
cannam@125 495 Example:
cannam@125 496 </P>
cannam@125 497 <PRE>
cannam@125 498 double peaks [number_of_channels] ;
cannam@125 499 sf_command (sndfile, SFC_GET_MAX_ALL_CHANNELS, peaks, sizeof (peaks)) ;
cannam@125 500 </PRE>
cannam@125 501 <DL>
cannam@125 502 <DT>Return value:</DT>
cannam@125 503 <DD>SF_TRUE if the file header contains per channel peak values for the file.
cannam@125 504 SF_FALSE otherwise.
cannam@125 505 </DL>
cannam@125 506
cannam@125 507
cannam@125 508 <!-- ========================================================================= -->
cannam@125 509 <A NAME="SFC_SET_NORM_FLOAT"></A>
cannam@125 510 <H2><BR><B>SFC_SET_NORM_FLOAT</B></H2>
cannam@125 511 <P>
cannam@125 512 This command only affects data read from or written to using the floating point functions:
cannam@125 513 </P>
cannam@125 514 <PRE>
cannam@125 515 size_t <A HREF="api.html#read">sf_read_float</A> (SNDFILE *sndfile, float *ptr, size_t items) ;
cannam@125 516 size_t <A HREF="api.html#readf">sf_readf_float</A> (SNDFILE *sndfile, float *ptr, size_t frames) ;
cannam@125 517
cannam@125 518 size_t <A HREF="api.html#write">sf_write_float</A> (SNDFILE *sndfile, float *ptr, size_t items) ;
cannam@125 519 size_t <A HREF="api.html#writef">sf_writef_float</A> (SNDFILE *sndfile, float *ptr, size_t frames) ;
cannam@125 520 </PRE>
cannam@125 521 <P>
cannam@125 522 Parameters:
cannam@125 523 </P>
cannam@125 524 <PRE>
cannam@125 525 sndfile : A valid SNDFILE* pointer
cannam@125 526 cmd : SFC_SET_NORM_FLOAT
cannam@125 527 data : NULL
cannam@125 528 datasize : SF_TRUE or SF_FALSE
cannam@125 529 </PRE>
cannam@125 530 <P>
cannam@125 531 For read operations setting normalisation to SF_TRUE means that the data from all
cannam@125 532 subsequent reads will be be normalised to the range [-1.0, 1.0].
cannam@125 533 </P>
cannam@125 534 <P>
cannam@125 535 For write operations, setting normalisation to SF_TRUE means than all data supplied
cannam@125 536 to the float write functions should be in the range [-1.0, 1.0] and will be scaled
cannam@125 537 for the file format as necessary.
cannam@125 538 </P>
cannam@125 539 <P>
cannam@125 540 For both cases, setting normalisation to SF_FALSE means that no scaling will take place.
cannam@125 541 </P>
cannam@125 542 <P>
cannam@125 543 Example:
cannam@125 544 </P>
cannam@125 545 <PRE>
cannam@125 546 sf_command (sndfile, SFC_SET_NORM_FLOAT, NULL, SF_TRUE) ;
cannam@125 547
cannam@125 548 sf_command (sndfile, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
cannam@125 549 </PRE>
cannam@125 550 <DL>
cannam@125 551 <DT>Return value: </DT>
cannam@125 552 <DD>Returns the previous float normalisation mode.
cannam@125 553 </DL>
cannam@125 554
cannam@125 555 <!-- ========================================================================= -->
cannam@125 556 <A NAME="SFC_SET_NORM_DOUBLE"></A>
cannam@125 557 <H2><BR><B>SFC_SET_NORM_DOUBLE</B></H2>
cannam@125 558 <P>
cannam@125 559 This command only affects data read from or written to using the double precision
cannam@125 560 floating point functions:
cannam@125 561 </P>
cannam@125 562 <PRE>
cannam@125 563 size_t <A HREF="api.html#read">sf_read_double</A> (SNDFILE *sndfile, double *ptr, size_t items) ;
cannam@125 564 size_t <A HREF="api.html#readf">sf_readf_double</A> (SNDFILE *sndfile, double *ptr, size_t frames) ;
cannam@125 565
cannam@125 566 size_t <A HREF="api.html#write">sf_write_double</A> (SNDFILE *sndfile, double *ptr, size_t items) ;
cannam@125 567 size_t <A HREF="api.html#writef">sf_writef_double</A> (SNDFILE *sndfile, double *ptr, size_t frames) ;
cannam@125 568 </PRE>
cannam@125 569 <P>
cannam@125 570 Parameters:
cannam@125 571 </P>
cannam@125 572 <PRE>
cannam@125 573 sndfile : A valid SNDFILE* pointer
cannam@125 574 cmd : SFC_SET_NORM_DOUBLE
cannam@125 575 data : NULL
cannam@125 576 datasize : SF_TRUE or SF_FALSE
cannam@125 577 </PRE>
cannam@125 578 <P>
cannam@125 579 For read operations setting normalisation to SF_TRUE means that the data
cannam@125 580 from all subsequent reads will be be normalised to the range [-1.0, 1.0].
cannam@125 581 </P>
cannam@125 582 <P>
cannam@125 583 For write operations, setting normalisation to SF_TRUE means than all data supplied
cannam@125 584 to the double write functions should be in the range [-1.0, 1.0] and will be scaled
cannam@125 585 for the file format as necessary.
cannam@125 586 </P>
cannam@125 587 <P>
cannam@125 588 For both cases, setting normalisation to SF_FALSE means that no scaling will take place.
cannam@125 589 </P>
cannam@125 590 <P>
cannam@125 591 Example:
cannam@125 592 </P>
cannam@125 593 <PRE>
cannam@125 594 sf_command (sndfile, SFC_SET_NORM_DOUBLE, NULL, SF_TRUE) ;
cannam@125 595
cannam@125 596 sf_command (sndfile, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
cannam@125 597 </PRE>
cannam@125 598 <DL>
cannam@125 599 <DT>Return value: </DT>
cannam@125 600 <DD>Returns the previous double normalisation mode.
cannam@125 601 </DL>
cannam@125 602
cannam@125 603 <!-- ========================================================================= -->
cannam@125 604 <A NAME="SFC_GET_NORM_FLOAT"></A>
cannam@125 605 <H2><BR><B>SFC_GET_NORM_FLOAT</B></H2>
cannam@125 606 <P>
cannam@125 607 Retrieve the current float normalisation mode.
cannam@125 608 </P>
cannam@125 609 <P>
cannam@125 610 Parameters:
cannam@125 611 </P>
cannam@125 612 <PRE>
cannam@125 613 sndfile : A valid SNDFILE* pointer
cannam@125 614 cmd : SFC_GET_NORM_FLOAT
cannam@125 615 data : NULL
cannam@125 616 datasize : anything
cannam@125 617 </PRE>
cannam@125 618 <P>
cannam@125 619 Example:
cannam@125 620 </P>
cannam@125 621 <PRE>
cannam@125 622 normalisation = sf_command (sndfile, SFC_GET_NORM_FLOAT, NULL, 0) ;
cannam@125 623 </PRE>
cannam@125 624 <DL>
cannam@125 625 <DT>Return value: </DT>
cannam@125 626 <DD>Returns TRUE if normalisation is on and FALSE otherwise.
cannam@125 627 </DL>
cannam@125 628
cannam@125 629 <!-- ========================================================================= -->
cannam@125 630 <A NAME="SFC_GET_NORM_DOUBLE"></A>
cannam@125 631 <H2><BR><B>SFC_GET_NORM_DOUBLE</B></H2>
cannam@125 632 <P>
cannam@125 633 Retrieve the current float normalisation mode.
cannam@125 634 </P>
cannam@125 635 <P>
cannam@125 636 Parameters:
cannam@125 637 </P>
cannam@125 638 <PRE>
cannam@125 639 sndfile : A valid SNDFILE* pointer
cannam@125 640 cmd : SFC_GET_NORM_DOUBLE
cannam@125 641 data : NULL
cannam@125 642 datasize : anything
cannam@125 643 </PRE>
cannam@125 644 <P>
cannam@125 645 Example:
cannam@125 646 </P>
cannam@125 647 <PRE>
cannam@125 648 normalisation = sf_command (sndfile, SFC_GET_NORM_DOUBLE, NULL, 0) ;
cannam@125 649 </PRE>
cannam@125 650 <DL>
cannam@125 651 <DT>Return value: </DT>
cannam@125 652 <DD>Returns TRUE if normalisation is on and FALSE otherwise.
cannam@125 653 </DL>
cannam@125 654
cannam@125 655
cannam@125 656 <!-- ========================================================================= -->
cannam@125 657 <A NAME="SFC_SET_SCALE_FLOAT_INT_READ"></A>
cannam@125 658 <H2><BR><B>SFC_SET_SCALE_FLOAT_INT_READ</B></H2>
cannam@125 659 <P>
cannam@125 660 Set/clear the scale factor when integer (short/int) data is read from a file
cannam@125 661 containing floating point data.
cannam@125 662 </P>
cannam@125 663 <P>
cannam@125 664 Parameters:
cannam@125 665 </P>
cannam@125 666 <PRE>
cannam@125 667 sndfile : A valid SNDFILE* pointer
cannam@125 668 cmd : SFC_SET_SCALE_FLOAT_INT_READ
cannam@125 669 data : NULL
cannam@125 670 datasize : TRUE or FALSE
cannam@125 671 </PRE>
cannam@125 672 <P>
cannam@125 673 Example:
cannam@125 674 </P>
cannam@125 675 <PRE>
cannam@125 676 sf_command (sndfile, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
cannam@125 677 </PRE>
cannam@125 678 <DL>
cannam@125 679 <DT>Return value: </DT>
cannam@125 680 <DD>Returns the previous SFC_SET_SCALE_FLOAT_INT_READ setting for this file.
cannam@125 681 </DL>
cannam@125 682
cannam@125 683
cannam@125 684 <!-- ========================================================================= -->
cannam@125 685 <A NAME="SFC_SET_SCALE_INT_FLOAT_WRITE"></A>
cannam@125 686 <H2><BR><B>SFC_SET_SCALE_INT_FLOAT_WRITE</B></H2>
cannam@125 687 <P>
cannam@125 688 Set/clear the scale factor when integer (short/int) data is written to a file
cannam@125 689 as floating point data.
cannam@125 690 </P>
cannam@125 691 <P>
cannam@125 692 Parameters:
cannam@125 693 </P>
cannam@125 694 <PRE>
cannam@125 695 sndfile : A valid SNDFILE* pointer
cannam@125 696 cmd : SFC_SET_SCALE_FLOAT_INT_READ
cannam@125 697 data : NULL
cannam@125 698 datasize : TRUE or FALSE
cannam@125 699 </PRE>
cannam@125 700 <P>
cannam@125 701 Example:
cannam@125 702 </P>
cannam@125 703 <PRE>
cannam@125 704 sf_command (sndfile, SFC_SET_SCALE_INT_FLOAT_WRITE, NULL, SF_TRUE) ;
cannam@125 705 </PRE>
cannam@125 706 <DL>
cannam@125 707 <DT>Return value: </DT>
cannam@125 708 <DD>Returns the previous SFC_SET_SCALE_INT_FLOAT_WRITE setting for this file.
cannam@125 709 </DL>
cannam@125 710
cannam@125 711 <!-- ========================================================================= -->
cannam@125 712 <A NAME="SFC_GET_SIMPLE_FORMAT_COUNT"></A>
cannam@125 713 <H2><BR><B>SFC_GET_SIMPLE_FORMAT_COUNT</B></H2>
cannam@125 714 <P>
cannam@125 715 Retrieve the number of simple formats supported by libsndfile.
cannam@125 716 </P>
cannam@125 717 <P>
cannam@125 718 Parameters:
cannam@125 719 </P>
cannam@125 720 <PRE>
cannam@125 721 sndfile : Not used.
cannam@125 722 cmd : SFC_GET_SIMPLE_FORMAT_COUNT
cannam@125 723 data : a pointer to an int
cannam@125 724 datasize : sizeof (int)
cannam@125 725 </PRE>
cannam@125 726 <P>
cannam@125 727 Example:
cannam@125 728 </P>
cannam@125 729 <PRE>
cannam@125 730 int count ;
cannam@125 731 sf_command (sndfile, SFC_GET_SIMPLE_FORMAT_COUNT, &amp;count, sizeof (int)) ;
cannam@125 732 </PRE>
cannam@125 733 <DL>
cannam@125 734 <DT>Return value: </DT>
cannam@125 735 <DD>0
cannam@125 736 </DL>
cannam@125 737
cannam@125 738 <!-- ========================================================================= -->
cannam@125 739 <A NAME="SFC_GET_SIMPLE_FORMAT"></A>
cannam@125 740 <H2><BR><B>SFC_GET_SIMPLE_FORMAT</B></H2>
cannam@125 741 <P>
cannam@125 742 Retrieve information about a simple format.
cannam@125 743 </P>
cannam@125 744 <P>
cannam@125 745 Parameters:
cannam@125 746 </P>
cannam@125 747 <PRE>
cannam@125 748 sndfile : Not used.
cannam@125 749 cmd : SFC_GET_SIMPLE_FORMAT
cannam@125 750 data : a pointer to an SF_FORMAT_INFO struct
cannam@125 751 datasize : sizeof (SF_FORMAT_INFO)
cannam@125 752 </PRE>
cannam@125 753 <P>
cannam@125 754 The SF_FORMAT_INFO struct is defined in &lt;sndfile.h&gt; as:
cannam@125 755 </P>
cannam@125 756 <PRE>
cannam@125 757 typedef struct
cannam@125 758 { int format ;
cannam@125 759 const char *name ;
cannam@125 760 const char *extension ;
cannam@125 761 } SF_FORMAT_INFO ;
cannam@125 762 </PRE>
cannam@125 763 <P>
cannam@125 764 When sf_command() is called with SF_GET_SIMPLE_FORMAT, the value of the format
cannam@125 765 field should be the format number (ie 0 &lt;= format &lt;= count value obtained using
cannam@125 766 SF_GET_SIMPLE_FORMAT_COUNT).
cannam@125 767 </P>
cannam@125 768 <P>
cannam@125 769 Example:
cannam@125 770 </P>
cannam@125 771 <PRE>
cannam@125 772 SF_FORMAT_INFO format_info ;
cannam@125 773 int k, count ;
cannam@125 774
cannam@125 775 sf_command (sndfile, SFC_GET_SIMPLE_FORMAT_COUNT, &amp;count, sizeof (int)) ;
cannam@125 776
cannam@125 777 for (k = 0 ; k &lt; count ; k++)
cannam@125 778 { format_info.format = k ;
cannam@125 779 sf_command (sndfile, SFC_GET_SIMPLE_FORMAT, &amp;format_info, sizeof (format_info)) ;
cannam@125 780 printf ("%08x %s %s\n", format_info.format, format_info.name, format_info.extension) ;
cannam@125 781 } ;
cannam@125 782 </PRE>
cannam@125 783 <DL>
cannam@125 784 <DT>Return value: </DT>
cannam@125 785 <DD>0 on success and non-zero otherwise.
cannam@125 786 <DD>The value of the format field of the SF_FORMAT_INFO struct will be a value which
cannam@125 787 can be placed in the format field of an SF_INFO struct when a file is to be opened
cannam@125 788 for write.
cannam@125 789 <DD>The name field will contain a char* pointer to the name of the string, eg. "WAV (Microsoft 16 bit PCM)".
cannam@125 790 <DD>The extension field will contain the most commonly used file extension for that file type.
cannam@125 791 </DL>
cannam@125 792
cannam@125 793 <!-- ========================================================================= -->
cannam@125 794 <A NAME="SFC_GET_FORMAT_INFO"></A>
cannam@125 795 <H2><BR><B>SFC_GET_FORMAT_INFO</B></H2>
cannam@125 796 <P>
cannam@125 797 Retrieve information about a major or subtype format.
cannam@125 798 </P>
cannam@125 799 <P>
cannam@125 800 Parameters:
cannam@125 801 </P>
cannam@125 802 <PRE>
cannam@125 803 sndfile : Not used.
cannam@125 804 cmd : SFC_GET_FORMAT_INFO
cannam@125 805 data : a pointer to an SF_FORMAT_INFO struct
cannam@125 806 datasize : sizeof (SF_FORMAT_INFO)
cannam@125 807 </PRE>
cannam@125 808 <P>
cannam@125 809 The SF_FORMAT_INFO struct is defined in &lt;sndfile.h&gt; as:
cannam@125 810 </P>
cannam@125 811 <PRE>
cannam@125 812 typedef struct
cannam@125 813 { int format ;
cannam@125 814 const char *name ;
cannam@125 815 const char *extension ;
cannam@125 816 } SF_FORMAT_INFO ;
cannam@125 817 </PRE>
cannam@125 818 <P>
cannam@125 819 When sf_command() is called with SF_GET_FORMAT_INFO, the format field is
cannam@125 820 examined and if (format &amp; SF_FORMAT_TYPEMASK) is a valid format then the struct
cannam@125 821 is filled in with information about the given major type.
cannam@125 822 If (format &amp; SF_FORMAT_TYPEMASK) is FALSE and (format &amp; SF_FORMAT_SUBMASK) is a
cannam@125 823 valid subtype format then the struct is filled in with information about the given
cannam@125 824 subtype.
cannam@125 825 </P>
cannam@125 826 <P>
cannam@125 827 Example:
cannam@125 828 </P>
cannam@125 829 <PRE>
cannam@125 830 SF_FORMAT_INFO format_info ;
cannam@125 831
cannam@125 832 format_info.format = SF_FORMAT_WAV ;
cannam@125 833 sf_command (sndfile, SFC_GET_FORMAT_INFO, &amp;format_info, sizeof (format_info)) ;
cannam@125 834 printf ("%08x %s %s\n", format_info.format, format_info.name, format_info.extension) ;
cannam@125 835
cannam@125 836 format_info.format = SF_FORMAT_ULAW ;
cannam@125 837 sf_command (sndfile, SFC_GET_FORMAT_INFO, &amp;format_info, sizeof (format_info)) ;
cannam@125 838 printf ("%08x %s\n", format_info.format, format_info.name) ;
cannam@125 839 </PRE>
cannam@125 840 <DL>
cannam@125 841 <DT>Return value: </DT>
cannam@125 842 <DD>0 on success and non-zero otherwise.
cannam@125 843 </DL>
cannam@125 844 <!-- ========================================================================= -->
cannam@125 845 <A NAME="SFC_GET_FORMAT_MAJOR_COUNT"></A>
cannam@125 846 <H2><BR><B>SFC_GET_FORMAT_MAJOR_COUNT</B></H2>
cannam@125 847 <P>
cannam@125 848 Retrieve the number of major formats.
cannam@125 849 </P>
cannam@125 850 <P>
cannam@125 851 Parameters:
cannam@125 852 </P>
cannam@125 853 <PRE>
cannam@125 854 sndfile : Not used.
cannam@125 855 cmd : SFC_GET_FORMAT_MAJOR_COUNT
cannam@125 856 data : a pointer to an int
cannam@125 857 datasize : sizeof (int)
cannam@125 858 </PRE>
cannam@125 859 <P>
cannam@125 860 Example:
cannam@125 861 </P>
cannam@125 862 <PRE>
cannam@125 863 int count ;
cannam@125 864 sf_command (sndfile, SFC_GET_FORMAT_MAJOR_COUNT, &amp;count, sizeof (int)) ;
cannam@125 865 </PRE>
cannam@125 866 <DL>
cannam@125 867 <DT>Return value: </DT>
cannam@125 868 <DD>0
cannam@125 869 </DL>
cannam@125 870
cannam@125 871 <!-- ========================================================================= -->
cannam@125 872 <A NAME="SFC_GET_FORMAT_MAJOR"></A>
cannam@125 873 <H2><BR><B>SFC_GET_FORMAT_MAJOR</B></H2>
cannam@125 874 <P>
cannam@125 875 Retrieve information about a major format type.
cannam@125 876 </P>
cannam@125 877 <P>
cannam@125 878 Parameters:
cannam@125 879 </P>
cannam@125 880 <PRE>
cannam@125 881 sndfile : Not used.
cannam@125 882 cmd : SFC_GET_FORMAT_MAJOR
cannam@125 883 data : a pointer to an SF_FORMAT_INFO struct
cannam@125 884 datasize : sizeof (SF_FORMAT_INFO)
cannam@125 885 </PRE>
cannam@125 886 <P>
cannam@125 887 Example:
cannam@125 888 </P>
cannam@125 889 <PRE>
cannam@125 890 SF_FORMAT_INFO format_info ;
cannam@125 891 int k, count ;
cannam@125 892
cannam@125 893 sf_command (sndfile, SFC_GET_FORMAT_MAJOR_COUNT, &amp;count, sizeof (int)) ;
cannam@125 894
cannam@125 895 for (k = 0 ; k &lt; count ; k++)
cannam@125 896 { format_info.format = k ;
cannam@125 897 sf_command (sndfile, SFC_GET_FORMAT_MAJOR, &amp;format_info, sizeof (format_info)) ;
cannam@125 898 printf ("%08x %s %s\n", format_info.format, format_info.name, format_info.extension) ;
cannam@125 899 } ;
cannam@125 900 </PRE>
cannam@125 901 <P>
cannam@125 902 For a more comprehensive example, see the program list_formats.c in the examples/
cannam@125 903 directory of the libsndfile source code distribution.
cannam@125 904 </P>
cannam@125 905 <DL>
cannam@125 906 <DT>Return value: </DT>
cannam@125 907 <DD>0 on success and non-zero otherwise.
cannam@125 908 <DD>The value of the format field will be one of the major format identifiers such as
cannam@125 909 SF_FORMAT_WAV or SF_FORMAT_AIFF.
cannam@125 910 <DD>The name field will contain a char* pointer to the name of the string, eg. "WAV (Microsoft)".
cannam@125 911 <DD>The extension field will contain the most commonly used file extension for that file type.
cannam@125 912 </DL>
cannam@125 913
cannam@125 914 <!-- ========================================================================= -->
cannam@125 915 <A NAME="SFC_GET_FORMAT_SUBTYPE_COUNT"></A>
cannam@125 916 <H2><BR><B>SFC_GET_FORMAT_SUBTYPE_COUNT</B></H2>
cannam@125 917 <P>
cannam@125 918 Retrieve the number of subformats.
cannam@125 919 </P>
cannam@125 920 <P>
cannam@125 921 Parameters:
cannam@125 922 </P>
cannam@125 923 <PRE>
cannam@125 924 sndfile : Not used.
cannam@125 925 cmd : SFC_GET_FORMAT_SUBTYPE_COUNT
cannam@125 926 data : a pointer to an int
cannam@125 927 datasize : sizeof (int)
cannam@125 928 </PRE>
cannam@125 929 <P>
cannam@125 930 Example:
cannam@125 931 </P>
cannam@125 932 <PRE>
cannam@125 933 int count ;
cannam@125 934 sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE_COUNT, &amp;count, sizeof (int)) ;
cannam@125 935 </PRE>
cannam@125 936 <DL>
cannam@125 937 <DT>Return value: </DT>
cannam@125 938 <DD>0
cannam@125 939 </DL>
cannam@125 940
cannam@125 941 <!-- ========================================================================= -->
cannam@125 942 <A NAME="SFC_GET_FORMAT_SUBTYPE"></A>
cannam@125 943 <H2><BR><B>SFC_GET_FORMAT_SUBTYPE</B></H2>
cannam@125 944 <P>
cannam@125 945 Enumerate the subtypes (this function does not translate a subtype into
cannam@125 946 a string describing that subtype).
cannam@125 947 A typical use case might be retrieving a string description of all subtypes
cannam@125 948 so that a dialog box can be filled in.
cannam@125 949 </P>
cannam@125 950 <P>
cannam@125 951
cannam@125 952 </P>
cannam@125 953 <P>
cannam@125 954 Parameters:
cannam@125 955 </P>
cannam@125 956 <PRE>
cannam@125 957 sndfile : Not used.
cannam@125 958 cmd : SFC_GET_FORMAT_SUBTYPE
cannam@125 959 data : a pointer to an SF_FORMAT_INFO struct
cannam@125 960 datasize : sizeof (SF_FORMAT_INFO)
cannam@125 961 </PRE>
cannam@125 962 <P>
cannam@125 963 Example 1: Retrieve all sybtypes supported by the WAV format.
cannam@125 964 </P>
cannam@125 965 <PRE>
cannam@125 966 SF_FORMAT_INFO format_info ;
cannam@125 967 int k, count ;
cannam@125 968
cannam@125 969 sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE_COUNT, &amp;count, sizeof (int)) ;
cannam@125 970
cannam@125 971 for (k = 0 ; k &lt; count ; k++)
cannam@125 972 { format_info.format = k ;
cannam@125 973 sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE, &amp;format_info, sizeof (format_info)) ;
cannam@125 974 if (! sf_format_check (format_info.format | SF_FORMAT_WAV))
cannam@125 975 continue ;
cannam@125 976 printf ("%08x %s\n", format_info.format, format_info.name) ;
cannam@125 977 } ;
cannam@125 978 </PRE>
cannam@125 979 <P>
cannam@125 980 Example 2: Print a string describing the SF_FORMAT_PCM_16 subtype.
cannam@125 981 </P>
cannam@125 982 <PRE>
cannam@125 983 SF_FORMAT_INFO format_info ;
cannam@125 984 int k, count ;
cannam@125 985
cannam@125 986 sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE_COUNT, &amp;count, sizeof (int)) ;
cannam@125 987
cannam@125 988 for (k = 0 ; k &lt; count ; k++)
cannam@125 989 { format_info.format = k ;
cannam@125 990 sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE, &amp;format_info, sizeof (format_info)) ;
cannam@125 991 if (format_info.format == SF_FORMAT_PCM_16)
cannam@125 992 { printf ("%08x %s\n", format_info.format, format_info.name) ;
cannam@125 993 break ;
cannam@125 994 } ;
cannam@125 995 } ;
cannam@125 996 </PRE>
cannam@125 997 <P>
cannam@125 998 For a more comprehensive example, see the program list_formats.c in the examples/
cannam@125 999 directory of the libsndfile source code distribution.
cannam@125 1000 </P>
cannam@125 1001 <DL>
cannam@125 1002 <DT>Return value: </DT>
cannam@125 1003 <DD>0 on success and non-zero otherwise.
cannam@125 1004 <DD>The value of the format field will be one of the major format identifiers such as
cannam@125 1005 SF_FORMAT_WAV or SF_FORMAT_AIFF.
cannam@125 1006 <DD>The name field will contain a char* pointer to the name of the string; for instance
cannam@125 1007 "WAV (Microsoft)" or "AIFF (Apple/SGI)".
cannam@125 1008 <DD>The extension field will be a NULL pointer.
cannam@125 1009 </DL>
cannam@125 1010
cannam@125 1011 <!-- ========================================================================= -->
cannam@125 1012 <A NAME="SFC_SET_ADD_PEAK_CHUNK"></A>
cannam@125 1013 <H2><BR><B>SFC_SET_ADD_PEAK_CHUNK</B></H2>
cannam@125 1014 <P>
cannam@125 1015 By default, WAV and AIFF files which contain floating point data (subtype SF_FORMAT_FLOAT
cannam@125 1016 or SF_FORMAT_DOUBLE) have a PEAK chunk.
cannam@125 1017 By using this command, the addition of a PEAK chunk can be turned on or off.
cannam@125 1018 </P>
cannam@125 1019 <P>
cannam@125 1020 Note : This call must be made before any data is written to the file.
cannam@125 1021 </P>
cannam@125 1022 <P>
cannam@125 1023 Parameters:
cannam@125 1024 <PRE>
cannam@125 1025 sndfile : A valid SNDFILE* pointer
cannam@125 1026 cmd : SFC_SET_ADD_PEAK_CHUNK
cannam@125 1027 data : Not used (should be NULL)
cannam@125 1028 datasize : TRUE or FALSE.
cannam@125 1029 </PRE>
cannam@125 1030 <P>
cannam@125 1031 Example:
cannam@125 1032 </P>
cannam@125 1033 <PRE>
cannam@125 1034 /* Turn on the PEAK chunk. */
cannam@125 1035 sf_command (sndfile, SFC_SET_ADD_PEAK_CHUNK, NULL, SF_TRUE) ;
cannam@125 1036
cannam@125 1037 /* Turn off the PEAK chunk. */
cannam@125 1038 sf_command (sndfile, SFC_SET_ADD_PEAK_CHUNK, NULL, SF_FALSE) ;
cannam@125 1039 </PRE>
cannam@125 1040 <DL>
cannam@125 1041 <DT>Return value:</DT>
cannam@125 1042 <DD>Returns SF_TRUE if the peak chunk will be written after this call.
cannam@125 1043 <DD>Returns SF_FALSE if the peak chunk will not be written after this call.
cannam@125 1044 </DL>
cannam@125 1045
cannam@125 1046 <!-- ========================================================================= -->
cannam@125 1047 <A NAME="SFC_UPDATE_HEADER_NOW"></A>
cannam@125 1048 <H2><BR><B>SFC_UPDATE_HEADER_NOW</B></H2>
cannam@125 1049 <P>
cannam@125 1050 The header of an audio file is normally written by libsndfile when the file is
cannam@125 1051 closed using <B>sf_close()</B>.
cannam@125 1052 </P>
cannam@125 1053 <P>
cannam@125 1054 There are however situations where large files are being generated and it would
cannam@125 1055 be nice to have valid data in the header before the file is complete.
cannam@125 1056 Using this command will update the file header to reflect the amount of data written
cannam@125 1057 to the file so far.
cannam@125 1058 Other programs opening the file for read (before any more data is written) will
cannam@125 1059 then read a valid sound file header.
cannam@125 1060 </P>
cannam@125 1061 <P>
cannam@125 1062 Parameters:
cannam@125 1063 <PRE>
cannam@125 1064 sndfile : A valid SNDFILE* pointer
cannam@125 1065 cmd : SFC_UPDATE_HEADER_NOW
cannam@125 1066 data : Not used (should be NULL)
cannam@125 1067 datasize : Not used.
cannam@125 1068 </PRE>
cannam@125 1069 <P>
cannam@125 1070 Example:
cannam@125 1071 </P>
cannam@125 1072 <PRE>
cannam@125 1073 /* Update the header now. */
cannam@125 1074 sf_command (sndfile, SFC_UPDATE_HEADER_NOW, NULL, 0) ;
cannam@125 1075 </PRE>
cannam@125 1076 <DL>
cannam@125 1077 <DT>Return value:</DT>
cannam@125 1078 <DD>0
cannam@125 1079 </DL>
cannam@125 1080
cannam@125 1081 <!-- ========================================================================= -->
cannam@125 1082 <A NAME="SFC_SET_UPDATE_HEADER_AUTO"></A>
cannam@125 1083 <H2><BR><B>SFC_SET_UPDATE_HEADER_AUTO</B></H2>
cannam@125 1084 <P>
cannam@125 1085 Similar to SFC_UPDATE_HEADER_NOW but updates the header at the end of every call
cannam@125 1086 to the <B>sf_write*</B> functions.
cannam@125 1087 </P>
cannam@125 1088 <P>
cannam@125 1089 Parameters:
cannam@125 1090 <PRE>
cannam@125 1091 sndfile : A valid SNDFILE* pointer
cannam@125 1092 cmd : SFC_UPDATE_HEADER_NOW
cannam@125 1093 data : Not used (should be NULL)
cannam@125 1094 datasize : SF_TRUE or SF_FALSE
cannam@125 1095 </PRE>
cannam@125 1096 <P>
cannam@125 1097 Example:
cannam@125 1098 </P>
cannam@125 1099 <PRE>
cannam@125 1100 /* Turn on auto header update. */
cannam@125 1101 sf_command (sndfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) ;
cannam@125 1102
cannam@125 1103 /* Turn off auto header update. */
cannam@125 1104 sf_command (sndfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_FALSE) ;
cannam@125 1105 </PRE>
cannam@125 1106 <DL>
cannam@125 1107 <DT>Return value:</DT>
cannam@125 1108 <DD>TRUE if auto update header is now on; FALSE otherwise.
cannam@125 1109 </DL>
cannam@125 1110
cannam@125 1111 <!-- ========================================================================= -->
cannam@125 1112 <A NAME="SFC_FILE_TRUNCATE"></A>
cannam@125 1113 <H2><BR><B>SFC_FILE_TRUNCATE</B></H2>
cannam@125 1114 <P>
cannam@125 1115 Truncate a file that was opened for write or read/write.
cannam@125 1116 </P>
cannam@125 1117 <P>
cannam@125 1118 Parameters:
cannam@125 1119 <PRE>
cannam@125 1120 sndfile : A valid SNDFILE* pointer
cannam@125 1121 cmd : SFC_FILE_TRUNCATE
cannam@125 1122 data : A pointer to an sf_count_t.
cannam@125 1123 datasize : sizeof (sf_count_t)
cannam@125 1124 </PRE>
cannam@125 1125
cannam@125 1126 <P>
cannam@125 1127 Truncate the file to the number of frames specified by the sf_count_t pointed
cannam@125 1128 to by data.
cannam@125 1129 After this command, both the read and the write pointer will be
cannam@125 1130 at the new end of the file.
cannam@125 1131 This command will fail (returning non-zero) if the requested truncate position
cannam@125 1132 is beyond the end of the file.
cannam@125 1133 </P>
cannam@125 1134 <P>
cannam@125 1135 Example:
cannam@125 1136 </P>
cannam@125 1137 <PRE>
cannam@125 1138 /* Truncate the file to a length of 20 frames. */
cannam@125 1139 sf_count_t frames = 20 ;
cannam@125 1140 sf_command (sndfile, SFC_FILE_TRUNCATE, &amp;frames, sizeof (frames)) ;
cannam@125 1141 </PRE>
cannam@125 1142 <DL>
cannam@125 1143 <DT>Return value:</DT>
cannam@125 1144 <DD>Zero on sucess, non-zero otherwise.
cannam@125 1145 </DL>
cannam@125 1146
cannam@125 1147 <!-- ========================================================================= -->
cannam@125 1148 <A NAME="SFC_SET_RAW_START_OFFSET"></A>
cannam@125 1149 <H2><BR><B>SFC_SET_RAW_START_OFFSET</B></H2>
cannam@125 1150 <P>
cannam@125 1151 Change the data start offset for files opened up as SF_FORMAT_RAW.
cannam@125 1152 </P>
cannam@125 1153 <P>
cannam@125 1154 Parameters:
cannam@125 1155 <PRE>
cannam@125 1156 sndfile : A valid SNDFILE* pointer
cannam@125 1157 cmd : SFC_SET_RAW_START_OFFSET
cannam@125 1158 data : A pointer to an sf_count_t.
cannam@125 1159 datasize : sizeof (sf_count_t)
cannam@125 1160 </PRE>
cannam@125 1161
cannam@125 1162 <P>
cannam@125 1163 For a file opened as format SF_FORMAT_RAW, set the data offset to the value
cannam@125 1164 given by data.
cannam@125 1165 </P>
cannam@125 1166 <P>
cannam@125 1167 Example:
cannam@125 1168 </P>
cannam@125 1169 <PRE>
cannam@125 1170 /* Reset the data offset to 5 bytes from the start of the file. */
cannam@125 1171 sf_count_t offset = 5 ;
cannam@125 1172 sf_command (sndfile, SFC_SET_RAW_START_OFFSET, &amp;offset, sizeof (offset)) ;
cannam@125 1173 </PRE>
cannam@125 1174 <DL>
cannam@125 1175 <DT>Return value:</DT>
cannam@125 1176 <DD>Zero on success, non-zero otherwise.
cannam@125 1177 </DL>
cannam@125 1178
cannam@125 1179 <!-- ========================================================================= -->
cannam@125 1180 <A NAME="SFC_SET_CLIPPING"></A>
cannam@125 1181 <H2><BR><B>SFC_SET_CLIPPING</B></H2>
cannam@125 1182 <P>
cannam@125 1183 Turn on/off automatic clipping when doing floating point to integer conversion.
cannam@125 1184 </P>
cannam@125 1185 <P>
cannam@125 1186 Parameters:
cannam@125 1187 <PRE>
cannam@125 1188 sndfile : A valid SNDFILE* pointer
cannam@125 1189 cmd : SFC_SET_CLIPPING
cannam@125 1190 data : NULL
cannam@125 1191 datasize : SF_TRUE or SF_FALSE.
cannam@125 1192 </PRE>
cannam@125 1193
cannam@125 1194 <P>
cannam@125 1195 Turn on (datasize == SF_TRUE) or off (datasize == SF_FALSE) clipping.
cannam@125 1196 </P>
cannam@125 1197 <P>
cannam@125 1198 Example:
cannam@125 1199 </P>
cannam@125 1200 <PRE>
cannam@125 1201 sf_command (sndfile, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
cannam@125 1202 </PRE>
cannam@125 1203 <DL>
cannam@125 1204 <DT>Return value:</DT>
cannam@125 1205 <DD>Clipping mode (SF_TRUE or SF_FALSE).
cannam@125 1206 </DL>
cannam@125 1207
cannam@125 1208
cannam@125 1209 <!-- ========================================================================= -->
cannam@125 1210 <A NAME="SFC_GET_CLIPPING"></A>
cannam@125 1211 <H2><BR><B>SFC_GET_CLIPPING</B></H2>
cannam@125 1212 <P>
cannam@125 1213 Turn on/off automatic clipping when doing floating point to integer conversion.
cannam@125 1214 </P>
cannam@125 1215 <P>
cannam@125 1216 Parameters:
cannam@125 1217 <PRE>
cannam@125 1218 sndfile : A valid SNDFILE* pointer
cannam@125 1219 cmd : SFC_GET_CLIPPING
cannam@125 1220 data : NULL
cannam@125 1221 datasize : 0
cannam@125 1222 </PRE>
cannam@125 1223
cannam@125 1224 <P>
cannam@125 1225 Retrieve the current cliiping setting.
cannam@125 1226 </P>
cannam@125 1227 <P>
cannam@125 1228 Example:
cannam@125 1229 </P>
cannam@125 1230 <PRE>
cannam@125 1231 sf_command (sndfile, SFC_GET_CLIPPING, NULL, 0) ;
cannam@125 1232 </PRE>
cannam@125 1233 <DL>
cannam@125 1234 <DT>Return value:</DT>
cannam@125 1235 <DD>Clipping mode (SF_TRUE or SF_FALSE).
cannam@125 1236 </DL>
cannam@125 1237
cannam@125 1238 <!-- ========================================================================= -->
cannam@125 1239 <A NAME="SFC_GET_EMBED_FILE_INFO"></A>
cannam@125 1240 <H2><BR><B>SFC_GET_EMBED_FILE_INFO</B></H2>
cannam@125 1241 <P>
cannam@125 1242 Get the file offset and file length of a file enbedded within another
cannam@125 1243 larger file.
cannam@125 1244 </P>
cannam@125 1245 <P>
cannam@125 1246 Parameters:
cannam@125 1247 <PRE>
cannam@125 1248 sndfile : A valid SNDFILE* pointer
cannam@125 1249 cmd : SFC_GET_CLIPPING
cannam@125 1250 data : a pointer to an SF_EMBED_FILE_INFO struct
cannam@125 1251 datasize : sizeof (SF_EMBED_FILE_INFO)
cannam@125 1252 </PRE>
cannam@125 1253 <P>
cannam@125 1254 The SF_EMBED_FILE_INFO struct is defined in &lt;sndfile.h&gt; as:
cannam@125 1255 </P>
cannam@125 1256 <PRE>
cannam@125 1257 typedef struct
cannam@125 1258 { sf_count_t offset ;
cannam@125 1259 sf_count_t length ;
cannam@125 1260 } SF_EMBED_FILE_INFO ;
cannam@125 1261 </PRE>
cannam@125 1262 <DL>
cannam@125 1263 <DT>Return value: </DT>
cannam@125 1264 <DD>0 on success and non-zero otherwise.
cannam@125 1265 <DD>The value of the offset field of the SF_EMBED_FILE_INFO struct will be
cannam@125 1266 the offsets in bytes from the start of the outer file to the start of
cannam@125 1267 the audio file.
cannam@125 1268 <DD>The value of the offset field of the SF_EMBED_FILE_INFO struct will be
cannam@125 1269 the length in bytes of the embedded file.
cannam@125 1270 </DL>
cannam@125 1271
cannam@125 1272
cannam@125 1273
cannam@125 1274 <!-- ========================================================================= -->
cannam@125 1275 <A NAME="SFC_WAVEX_GET_AMBISONIC"></A>
cannam@125 1276 <H2><BR><B>SFC_WAVEX_GET_AMBISONIC</B></H2>
cannam@125 1277 <P>
cannam@125 1278 Test if the current file has the GUID of a WAVEX file for any of the Ambisonic
cannam@125 1279 formats.
cannam@125 1280 </P>
cannam@125 1281 <P>
cannam@125 1282 Parameters:
cannam@125 1283 <PRE>
cannam@125 1284 sndfile : A valid SNDFILE* pointer
cannam@125 1285 cmd : SFC_WAVEX_GET_AMBISONIC
cannam@125 1286 data : NULL
cannam@125 1287 datasize : 0
cannam@125 1288 </PRE>
cannam@125 1289 <P>
cannam@125 1290 The Ambisonic WAVEX formats are defined here :
cannam@125 1291 <A HREF="http://dream.cs.bath.ac.uk/researchdev/wave-ex/bformat.html">
cannam@125 1292 http://dream.cs.bath.ac.uk/researchdev/wave-ex/bformat.html</A>.
cannam@125 1293 </P>
cannam@125 1294 <DL>
cannam@125 1295 <DT>Return value: </DT>
cannam@125 1296 <DD>SF_AMBISONIC_NONE or SF_AMBISONIC_B_FORMAT or zero if the file format
cannam@125 1297 does not support ambisonic formats.
cannam@125 1298 </DL>
cannam@125 1299
cannam@125 1300 <!-- ========================================================================= -->
cannam@125 1301 <A NAME="SFC_WAVEX_SET_AMBISONIC"></A>
cannam@125 1302 <H2><BR><B>SFC_WAVEX_SET_AMBISONIC</B></H2>
cannam@125 1303 <P>
cannam@125 1304 Set the GUID of a new WAVEX file to indicate an Ambisonics format.
cannam@125 1305 </P>
cannam@125 1306 <P>
cannam@125 1307 Parameters:
cannam@125 1308 <PRE>
cannam@125 1309 sndfile : A valid SNDFILE* pointer
cannam@125 1310 cmd : SFC_WAVEX_SET_AMBISONIC
cannam@125 1311 data : NULL
cannam@125 1312 datasize : SF_AMBISONIC_NONE or SF_AMBISONIC_B_FORMAT
cannam@125 1313 </PRE>
cannam@125 1314 <P>
cannam@125 1315 Turn on (SF_AMBISONIC_B_FORMAT) or off (SF_AMBISONIC_NONE) encoding.
cannam@125 1316 This command is currently only supported for files with SF_FORMAT_WAVEX format.
cannam@125 1317 </P>
cannam@125 1318 <P>
cannam@125 1319 The Ambisonic WAVEX formats are defined here :
cannam@125 1320 <A HREF="http://dream.cs.bath.ac.uk/researchdev/wave-ex/bformat.html">
cannam@125 1321 http://dream.cs.bath.ac.uk/researchdev/wave-ex/bformat.html</A>.
cannam@125 1322 </P>
cannam@125 1323 <DL>
cannam@125 1324 <DT>Return value: </DT>
cannam@125 1325 <DD>Return the ambisonic value that has just been set or zero if the file
cannam@125 1326 format does not support ambisonic encoding.
cannam@125 1327 </DL>
cannam@125 1328
cannam@125 1329 <!-- ========================================================================= -->
cannam@125 1330 <A NAME="SFC_SET_VBR_ENCODING_QUALITY"></A>
cannam@125 1331 <H2><BR><B>SFC_SET_VBR_ENCODING_QUALITY</B></H2>
cannam@125 1332 <P>
cannam@125 1333 Set the Variable Bit Rate encoding quality.
cannam@125 1334 The encoding quality value should be between 0.0 (lowest quality) and 1.0
cannam@125 1335 (highest quality).
cannam@125 1336 Currenly this command is only implemented for FLAC and Ogg/Vorbis files.
cannam@125 1337 It has no effect on un-compressed file formats.
cannam@125 1338 </P>
cannam@125 1339 <P>
cannam@125 1340 Parameters:
cannam@125 1341 <PRE>
cannam@125 1342 sndfile : A valid SNDFILE* pointer
cannam@125 1343 cmd : SFC_SET_VBR_ENCODING_QUALITY
cannam@125 1344 data : A pointer to a double value
cannam@125 1345 datasize : sizeof (double)
cannam@125 1346 </PRE>
cannam@125 1347 <P>
cannam@125 1348 The command must be sent before any audio data is written to the file.
cannam@125 1349 </P>
cannam@125 1350 <P>
cannam@125 1351 </P>
cannam@125 1352 <DL>
cannam@125 1353 <DT>Return value:</DT>
cannam@125 1354 <dd>SF_TRUE if VBR encoding quality was set.
cannam@125 1355 SF_FALSE otherwise.
cannam@125 1356 </DL>
cannam@125 1357
cannam@125 1358 <!-- ========================================================================= -->
cannam@125 1359 <A NAME="SFC_SET_COMPRESSION_LEVEL"></A>
cannam@125 1360 <H2><BR><B>SFC_SET_COMPRESSION_LEVEL</B></H2>
cannam@125 1361 <P>
cannam@125 1362 Set the compression level.
cannam@125 1363 The compression level should be between 0.0 (minimum compression level) and 1.0
cannam@125 1364 (highest compression level).
cannam@125 1365 Currenly this command is only implemented for FLAC and Ogg/Vorbis files.
cannam@125 1366 It has no effect on un-compressed file formats.
cannam@125 1367 </P>
cannam@125 1368 <P>
cannam@125 1369 Parameters:
cannam@125 1370 <PRE>
cannam@125 1371 sndfile : A valid SNDFILE* pointer
cannam@125 1372 cmd : SFC_SET_COMPRESSION_LEVEL
cannam@125 1373 data : A pointer to a double value
cannam@125 1374 datasize : sizeof (double)
cannam@125 1375 </PRE>
cannam@125 1376 <P>
cannam@125 1377 The command must be sent before any audio data is written to the file.
cannam@125 1378 </P>
cannam@125 1379 <P>
cannam@125 1380 </P>
cannam@125 1381 <DL>
cannam@125 1382 <DT>Return value:</DT>
cannam@125 1383 <dd>SF_TRUE if compression level was set.
cannam@125 1384 SF_FALSE otherwise.
cannam@125 1385 </DL>
cannam@125 1386
cannam@125 1387 <!-- ========================================================================= -->
cannam@125 1388 <A NAME="SFC_RAW_NEEDS_ENDSWAP"></A>
cannam@125 1389 <H2><BR><B>SFC_RAW_NEEDS_ENDSWAP</B></H2>
cannam@125 1390 <P>
cannam@125 1391 Determine if raw data read using
cannam@125 1392 <a href="api.html#raw">
cannam@125 1393 sf_read_raw</a>
cannam@125 1394 needs to be end swapped on the host CPU.
cannam@125 1395 </P>
cannam@125 1396 <P>
cannam@125 1397 For instance, will return SF_TRUE on when reading WAV containing
cannam@125 1398 SF_FORMAT_PCM_16 data on a big endian machine and SF_FALSE on a little endian
cannam@125 1399 machine.
cannam@125 1400 </P>
cannam@125 1401 <P>
cannam@125 1402 Parameters:
cannam@125 1403 <PRE>
cannam@125 1404 sndfile : A valid SNDFILE* pointer
cannam@125 1405 cmd : SFC_RAW_NEEDS_ENDSWAP
cannam@125 1406 data : NULL
cannam@125 1407 datasize : 0
cannam@125 1408 </PRE>
cannam@125 1409
cannam@125 1410 <DL>
cannam@125 1411 <DT>Return value: </DT>
cannam@125 1412 <DD>SF_TRUE or SF_FALSE
cannam@125 1413 </DL>
cannam@125 1414
cannam@125 1415
cannam@125 1416 <!-- ========================================================================= -->
cannam@125 1417 <A NAME="SFC_GET_BROADCAST_INFO"></A>
cannam@125 1418 <H2><BR><B>SFC_GET_BROADCAST_INFO</B></H2>
cannam@125 1419 <P>
cannam@125 1420 Retrieve the Broadcast Extension Chunk from WAV (and related) files.
cannam@125 1421 </P>
cannam@125 1422 <p>
cannam@125 1423 Parameters:
cannam@125 1424 </p>
cannam@125 1425 <PRE>
cannam@125 1426 sndfile : A valid SNDFILE* pointer
cannam@125 1427 cmd : SFC_GET_BROADCAST_INFO
cannam@125 1428 data : a pointer to an SF_BROADCAST_INFO struct
cannam@125 1429 datasize : sizeof (SF_BROADCAST_INFO)
cannam@125 1430 </PRE>
cannam@125 1431 <P>
cannam@125 1432 The SF_BROADCAST_INFO struct is defined in &lt;sndfile.h&gt; as:
cannam@125 1433 </P>
cannam@125 1434 <PRE>
cannam@125 1435 typedef struct
cannam@125 1436 { char description [256] ;
cannam@125 1437 char originator [32] ;
cannam@125 1438 char originator_reference [32] ;
cannam@125 1439 char origination_date [10] ;
cannam@125 1440 char origination_time [8] ;
cannam@125 1441 unsigned int time_reference_low ;
cannam@125 1442 unsigned int time_reference_high ;
cannam@125 1443 short version ;
cannam@125 1444 char umid [64] ;
cannam@125 1445 char reserved [190] ;
cannam@125 1446 unsigned int coding_history_size ;
cannam@125 1447 char coding_history [256] ;
cannam@125 1448 } SF_BROADCAST_INFO ;
cannam@125 1449 </PRE>
cannam@125 1450
cannam@125 1451 <DL>
cannam@125 1452 <DT>Return value: </DT>
cannam@125 1453 <DD>SF_TRUE if the file contained a Broadcast Extension chunk or SF_FALSE
cannam@125 1454 otherwise.
cannam@125 1455 </DL>
cannam@125 1456
cannam@125 1457 <!-- ========================================================================= -->
cannam@125 1458 <A NAME="SFC_SET_BROADCAST_INFO"></A>
cannam@125 1459 <H2><BR><B>SFC_SET_BROADCAST_INFO</B></H2>
cannam@125 1460 <P>
cannam@125 1461 Set the Broadcast Extension Chunk for WAV (and related) files.
cannam@125 1462 </P>
cannam@125 1463 <p>
cannam@125 1464 Parameters:
cannam@125 1465 </p>
cannam@125 1466 <PRE>
cannam@125 1467 sndfile : A valid SNDFILE* pointer
cannam@125 1468 cmd : SFC_SET_BROADCAST_INFO
cannam@125 1469 data : a pointer to an SF_BROADCAST_INFO struct
cannam@125 1470 datasize : sizeof (SF_BROADCAST_INFO)
cannam@125 1471 </PRE>
cannam@125 1472
cannam@125 1473 <DL>
cannam@125 1474 <DT>Return value: </DT>
cannam@125 1475 <DD>SF_TRUE if setting the Broadcast Extension chunk was successful and SF_FALSE
cannam@125 1476 otherwise.
cannam@125 1477
cannam@125 1478 </DL>
cannam@125 1479
cannam@125 1480 <!-- ========================================================================= -->
cannam@125 1481 <A NAME="SFC_GET_CART_INFO"></A>
cannam@125 1482 <H2><BR><B>SFC_GET_CART_INFO</B></H2>
cannam@125 1483 <P>Retrieve the Cart Chunk from WAV (and related) files. Based on AES46 standard for CartChunk (see <a href="http://www.cartchunk.org/">CartChunk.org</a> for more information.
cannam@125 1484 </P>
cannam@125 1485 <p>
cannam@125 1486 Parameters:
cannam@125 1487 </p>
cannam@125 1488 <PRE>
cannam@125 1489 sndfile : A valid SNDFILE* pointer
cannam@125 1490 cmd : SFC_GET_CART_INFO
cannam@125 1491 data : a pointer to an SF_CART_INFO struct
cannam@125 1492 datasize : sizeof (SF_CART_INFO)
cannam@125 1493 </PRE>
cannam@125 1494 <P>
cannam@125 1495 The SF_CART_INFO struct is defined in &lt;sndfile.h&gt; as:
cannam@125 1496 </P>
cannam@125 1497 <PRE>
cannam@125 1498 #define SF_CART_INFO_VAR(p_tag_text_size) \
cannam@125 1499 struct
cannam@125 1500 { char version [4] ;
cannam@125 1501 char title [64] ;
cannam@125 1502 char artist [64] ;
cannam@125 1503 char cut_id [64] ;
cannam@125 1504 char client_id [64] ;
cannam@125 1505 char category [64] ;
cannam@125 1506 char classification [64] ;
cannam@125 1507 char out_cue [64] ;
cannam@125 1508 char start_date [10] ;
cannam@125 1509 char start_time [8] ;
cannam@125 1510 char end_date [10] ;
cannam@125 1511 char end_time [8] ;
cannam@125 1512 char producer_app_id [64] ;
cannam@125 1513 char producer_app_version [64] ;
cannam@125 1514 char user_def [64] ;
cannam@125 1515 long level_reference ;
cannam@125 1516 SF_CART_TIMER post_timers [8] ;
cannam@125 1517 char reserved [276] ;
cannam@125 1518 char url [1024] ;
cannam@125 1519 unsigned int tag_text_size ;
cannam@125 1520 char tag_text[p_tag_text_size] ;
cannam@125 1521 }
cannam@125 1522 </PRE>
cannam@125 1523
cannam@125 1524 <DL>
cannam@125 1525 <DT>Return value: </DT>
cannam@125 1526 <DD>SF_TRUE if the file contained a Cart chunk or SF_FALSE
cannam@125 1527 otherwise.
cannam@125 1528 </DL>
cannam@125 1529
cannam@125 1530 <!-- ========================================================================= -->
cannam@125 1531 <A NAME="SFC_SET_CART_INFO"></A>
cannam@125 1532 <H2><BR><B>SFC_SET_CART_INFO</B></H2>
cannam@125 1533 <P>
cannam@125 1534 Set the Cart Chunk for WAV (and related) files.
cannam@125 1535 </P>
cannam@125 1536 <p>
cannam@125 1537 Parameters:
cannam@125 1538 </p>
cannam@125 1539 <PRE>
cannam@125 1540 sndfile : A valid SNDFILE* pointer
cannam@125 1541 cmd : SFC_SET_CART_INFO
cannam@125 1542 data : a pointer to an SF_CART_INFO struct
cannam@125 1543 datasize : sizeof (SF_CART_INFO)
cannam@125 1544 </PRE>
cannam@125 1545
cannam@125 1546 <DL>
cannam@125 1547 <DT>Return value: </DT>
cannam@125 1548 <DD>SF_TRUE if setting the Cart chunk was successful and SF_FALSE
cannam@125 1549 otherwise.
cannam@125 1550 </DL>
cannam@125 1551 <!-- ========================================================================= -->
cannam@125 1552
cannam@125 1553 <A NAME="SFC_GET_LOOP_INFO"></A>
cannam@125 1554 <H2><BR><B>SFC_GET_LOOP_INFO</B></H2>
cannam@125 1555 <P>
cannam@125 1556 Retrieve loop information for file including time signature, length in
cannam@125 1557 beats and original MIDI base note
cannam@125 1558 </P>
cannam@125 1559 <p>
cannam@125 1560 Parameters:
cannam@125 1561 </p>
cannam@125 1562 <PRE>
cannam@125 1563 sndfile : A valid SNDFILE* pointer
cannam@125 1564 cmd : SFC_GET_LOOP_INFO
cannam@125 1565 data : a pointer to an SF_LOOP_INFO struct
cannam@125 1566 datasize : sizeof (SF_LOOP_INFO)
cannam@125 1567 </PRE>
cannam@125 1568 <P>
cannam@125 1569 The SF_BROADCAST_INFO struct is defined in &lt;sndfile.h&gt; as:
cannam@125 1570 </P>
cannam@125 1571 <PRE>
cannam@125 1572 typedef struct
cannam@125 1573 { short time_sig_num ; /* any positive integer > 0 */
cannam@125 1574 short time_sig_den ; /* any positive power of 2 > 0 */
cannam@125 1575 int loop_mode ; /* see SF_LOOP enum */
cannam@125 1576
cannam@125 1577 int num_beats ; /* this is NOT the amount of quarter notes !!!*/
cannam@125 1578 /* a full bar of 4/4 is 4 beats */
cannam@125 1579 /* a full bar of 7/8 is 7 beats */
cannam@125 1580
cannam@125 1581 float bpm ; /* suggestion, as it can be calculated using other fields:*/
cannam@125 1582 /* file's lenght, file's sampleRate and our time_sig_den*/
cannam@125 1583 /* -> bpms are always the amount of _quarter notes_ per minute */
cannam@125 1584
cannam@125 1585 int root_key ; /* MIDI note, or -1 for None */
cannam@125 1586 int future [6] ;
cannam@125 1587 } SF_LOOP_INFO ;
cannam@125 1588 </PRE>
cannam@125 1589 <P>
cannam@125 1590 Example:
cannam@125 1591 </P>
cannam@125 1592 <PRE>
cannam@125 1593 SF_LOOP_INFO loop;
cannam@125 1594 sf_command (sndfile, SFC_GET_LOOP_INFO, &amp;loop, sizeof (loop)) ;
cannam@125 1595 </PRE>
cannam@125 1596 <DL>
cannam@125 1597 <DT>Return value:</DT>
cannam@125 1598 <DD>SF_TRUE if the file header contains loop information for the file.
cannam@125 1599 SF_FALSE otherwise.
cannam@125 1600 </DL>
cannam@125 1601
cannam@125 1602 <!-- ========================================================================= -->
cannam@125 1603
cannam@125 1604
cannam@125 1605 <A NAME="SFC_GET_INSTRUMENT"></A>
cannam@125 1606 <H2><BR><B>SFC_GET_INSTRUMENT</B></H2>
cannam@125 1607 <P>
cannam@125 1608 Retrieve instrument information from file including MIDI base note,
cannam@125 1609 keyboard mapping and looping informations(start/stop and mode).
cannam@125 1610 </P>
cannam@125 1611 <p>
cannam@125 1612 Parameters:
cannam@125 1613 </p>
cannam@125 1614 <PRE>
cannam@125 1615 sndfile : A valid SNDFILE* pointer
cannam@125 1616 cmd : SFC_GET_INSTRUMENT
cannam@125 1617 data : a pointer to an SF_INSTRUMENT struct
cannam@125 1618 datasize : sizeof (SF_INSTRUMENT)
cannam@125 1619 </PRE>
cannam@125 1620
cannam@125 1621 <P>
cannam@125 1622 The SF_INSTRUMENT struct is defined in &lt;sndfile.h&gt; as:
cannam@125 1623 </P>
cannam@125 1624 <PRE>
cannam@125 1625 enum
cannam@125 1626 { /*
cannam@125 1627 ** The loop mode field in SF_INSTRUMENT will be one of the following.
cannam@125 1628 */
cannam@125 1629 SF_LOOP_NONE = 800,
cannam@125 1630 SF_LOOP_FORWARD,
cannam@125 1631 SF_LOOP_BACKWARD,
cannam@125 1632 SF_LOOP_ALTERNATING
cannam@125 1633 } ;
cannam@125 1634
cannam@125 1635 typedef struct
cannam@125 1636 { int gain ;
cannam@125 1637 char basenote, detune ;
cannam@125 1638 char velocity_lo, velocity_hi ;
cannam@125 1639 char key_lo, key_hi ;
cannam@125 1640 int loop_count ;
cannam@125 1641
cannam@125 1642 struct
cannam@125 1643 { int mode ;
cannam@125 1644 unsigned int start ;
cannam@125 1645 unsigned int end ;
cannam@125 1646 unsigned int count ;
cannam@125 1647 } loops [16] ; /* make variable in a sensible way */
cannam@125 1648 } SF_INSTRUMENT ;
cannam@125 1649 </PRE>
cannam@125 1650
cannam@125 1651 <P>
cannam@125 1652 Example:
cannam@125 1653 </P>
cannam@125 1654 <PRE>
cannam@125 1655 SF_INSTRUMENT inst ;
cannam@125 1656 sf_command (sndfile, SFC_GET_INSTRUMENT, &amp;inst, sizeof (inst)) ;
cannam@125 1657 </PRE>
cannam@125 1658 <DL>
cannam@125 1659 <DT>Return value:</DT>
cannam@125 1660 <dd>SF_TRUE if the file header contains instrument information for the
cannam@125 1661 file. SF_FALSE otherwise.
cannam@125 1662 </DL>
cannam@125 1663
cannam@125 1664 <!-- ========================================================================= -->
cannam@125 1665
cannam@125 1666
cannam@125 1667 <A NAME="SFC_SET_INSTRUMENT"></A>
cannam@125 1668 <H2><BR><B>SFC_SET_INSTRUMENT</B></H2>
cannam@125 1669 <P>
cannam@125 1670 Set the instrument information for the file.
cannam@125 1671 </P>
cannam@125 1672 <p>
cannam@125 1673 Parameters:
cannam@125 1674 </p>
cannam@125 1675 <PRE>
cannam@125 1676 sndfile : A valid SNDFILE* pointer
cannam@125 1677 cmd : SFC_SET_INSTRUMENT
cannam@125 1678 data : a pointer to an SF_INSTRUMENT struct
cannam@125 1679 datasize : sizeof (SF_INSTRUMENT)
cannam@125 1680 </PRE>
cannam@125 1681 <P>
cannam@125 1682 Example:
cannam@125 1683 </P>
cannam@125 1684 <PRE>
cannam@125 1685 SF_INSTRUMENT inst ;
cannam@125 1686 sf_command (sndfile, SFC_SET_INSTRUMENT, &amp;inst, sizeof (inst)) ;
cannam@125 1687 </PRE>
cannam@125 1688 <DL>
cannam@125 1689 <DT>Return value:</DT>
cannam@125 1690 <dd>SF_TRUE if the file header contains instrument information for the
cannam@125 1691 file. SF_FALSE otherwise.
cannam@125 1692 </DL>
cannam@125 1693
cannam@125 1694
cannam@125 1695 <!-- ========================================================================= -->
cannam@125 1696
cannam@125 1697 <A NAME="SFC_GET_CUE"></A>
cannam@125 1698 <H2><BR><B>SFC_GET_CUE_COUNT</B></H2>
cannam@125 1699 <P>
cannam@125 1700 Retrieve the number of cue markers available for retrieval using the
cannam@125 1701 SFC_GET_CUE command.
cannam@125 1702 </P>
cannam@125 1703 <P>
cannam@125 1704 Parameters:
cannam@125 1705 </P>
cannam@125 1706 <PRE>
cannam@125 1707 sndfile : A valid SNDFILE* pointer
cannam@125 1708 cmd : SFC_GET_CUE
cannam@125 1709 data : a pointer to a uint32_t
cannam@125 1710 datasize : sizeof (uint32_t)
cannam@125 1711 </PRE>
cannam@125 1712
cannam@125 1713
cannam@125 1714 <P>
cannam@125 1715 Example:
cannam@125 1716 </P>
cannam@125 1717 <PRE>
cannam@125 1718 uint32_t cue_count ;
cannam@125 1719 sf_command (sndfile, SFC_GET_CUE_COUNT, &amp;cue_count, sizeof (cue_count)) ;
cannam@125 1720 </PRE>
cannam@125 1721 <DL>
cannam@125 1722 <DT>Return value:</DT>
cannam@125 1723 <dd>SF_TRUE if the file header contains cue marker information for the
cannam@125 1724 file. SF_FALSE otherwise.
cannam@125 1725 </DL>
cannam@125 1726
cannam@125 1727 <!-- ========================================================================= -->
cannam@125 1728
cannam@125 1729 <A NAME="SFC_GET_CUE"></A>
cannam@125 1730 <H2><BR><B>SFC_GET_CUE</B></H2>
cannam@125 1731 <P>
cannam@125 1732 Retrieve cue marker information from file.
cannam@125 1733 </P>
cannam@125 1734 <P>
cannam@125 1735 Parameters:
cannam@125 1736 </P>
cannam@125 1737 <PRE>
cannam@125 1738 sndfile : A valid SNDFILE* pointer
cannam@125 1739 cmd : SFC_GET_CUE
cannam@125 1740 data : a pointer to an SF_CUES struct
cannam@125 1741 datasize : sizeof (SF_CUES)
cannam@125 1742 </PRE>
cannam@125 1743
cannam@125 1744 <P>
cannam@125 1745 The SF_CUES struct is defined in &lt;sndfile.h&gt; as:
cannam@125 1746 </P>
cannam@125 1747 <PRE>
cannam@125 1748 typedef struct
cannam@125 1749 { int cue_count ;
cannam@125 1750
cannam@125 1751 struct
cannam@125 1752 { int32_t indx ;
cannam@125 1753 uint32_t position ;
cannam@125 1754 int32_t fcc_chunk ;
cannam@125 1755 int32_t chunk_start ;
cannam@125 1756 int32_t block_start ;
cannam@125 1757 uint32_t sample_offset ;
cannam@125 1758 char name [256] ;
cannam@125 1759 } cue_points [100] ;
cannam@125 1760 } SF_CUES ;
cannam@125 1761 </PRE>
cannam@125 1762
cannam@125 1763 <P>
cannam@125 1764 There is also an SF_CUES_VAR #define that allows reading/writing more than 100
cannam@125 1765 cue markers.
cannam@125 1766 </P>
cannam@125 1767
cannam@125 1768 <P>
cannam@125 1769 Example:
cannam@125 1770 </P>
cannam@125 1771 <PRE>
cannam@125 1772 SF_CUES cues ;
cannam@125 1773 sf_command (sndfile, SFC_GET_CUE, &amp;cues, sizeof (cues)) ;
cannam@125 1774 </PRE>
cannam@125 1775 <DL>
cannam@125 1776 <DT>Return value:</DT>
cannam@125 1777 <dd>SF_TRUE if the file header contains cue marker information for the
cannam@125 1778 file. SF_FALSE otherwise.
cannam@125 1779 </DL>
cannam@125 1780
cannam@125 1781
cannam@125 1782 <!-- ========================================================================= -->
cannam@125 1783
cannam@125 1784
cannam@125 1785 <A NAME="SFC_SET_CUE"></A>
cannam@125 1786 <H2><BR><B>SFC_SET_CUE</B></H2>
cannam@125 1787 <P>
cannam@125 1788 Set the cue marker information for the file.
cannam@125 1789 </P>
cannam@125 1790 <P>
cannam@125 1791 Parameters:
cannam@125 1792 </P>
cannam@125 1793 <PRE>
cannam@125 1794 sndfile : A valid SNDFILE* pointer
cannam@125 1795 cmd : SFC_SET_CUE
cannam@125 1796 data : a pointer to an SF_CUES struct
cannam@125 1797 datasize : sizeof (SF_CUES)
cannam@125 1798 </PRE>
cannam@125 1799 <P>
cannam@125 1800 Example:
cannam@125 1801 </P>
cannam@125 1802 <PRE>
cannam@125 1803 SF_CUES cues ;
cannam@125 1804 sf_command (sndfile, SFC_SET_CUE, &amp;cues, sizeof (cues)) ;
cannam@125 1805 </PRE>
cannam@125 1806 <DL>
cannam@125 1807 <DT>Return value:</DT>
cannam@125 1808 <dd>SF_TRUE if the file header contains cue marker information for the
cannam@125 1809 file. SF_FALSE otherwise.
cannam@125 1810 </DL>
cannam@125 1811
cannam@125 1812
cannam@125 1813 <!-- ========================================================================= -->
cannam@125 1814
cannam@125 1815
cannam@125 1816 <A NAME="SFC_RF64_AUTO_DOWNGRADE"></A>
cannam@125 1817 <H2><BR><B>SFC_RF64_AUTO_DOWNGRADE</B></H2>
cannam@125 1818 <P>
cannam@125 1819 Enable auto downgrade from RF64 to WAV.
cannam@125 1820 </P>
cannam@125 1821 <P>
cannam@125 1822 The EBU recomendation is that when writing RF64 files and the resulting file is
cannam@125 1823 less than 4Gig in size, it should be downgraded to a WAV file (WAV files have a
cannam@125 1824 maximum size of 4Gig).
cannam@125 1825 libsndfile doesn't follow the EBU recommendations exactly, , mainly because the
cannam@125 1826 test suite needs to be able test reading/writing RF64 files without having to
cannam@125 1827 generate files larger than 4 gigabytes.
cannam@125 1828 </P>
cannam@125 1829 <p>
cannam@125 1830 Note: This command should be issued before the first bit of audio data has been
cannam@125 1831 written to the file.
cannam@125 1832 Calling this command after audio data has been written will return the current
cannam@125 1833 value of this setting, but will not allow it to be changed.
cannam@125 1834 </p>
cannam@125 1835 <p>
cannam@125 1836 Parameters:
cannam@125 1837 </p>
cannam@125 1838 <PRE>
cannam@125 1839 sndfile : A valid SNDFILE* pointer
cannam@125 1840 cmd : SFC_RF64_AUTO_DOWNGRADE
cannam@125 1841 data : NULL
cannam@125 1842 datasize : SF_TRUE or SF_FALSE
cannam@125 1843 </PRE>
cannam@125 1844 <P>
cannam@125 1845 Example:
cannam@125 1846 </P>
cannam@125 1847 <PRE>
cannam@125 1848 /* Enable auto downgrade on file close. */
cannam@125 1849 sf_command (sndfile, SFC_RF64_AUTO_DOWNGRADE, NULL, SF_TRUE) ;
cannam@125 1850 </PRE>
cannam@125 1851 <DL>
cannam@125 1852 <DT>Return value:</DT>
cannam@125 1853 <dd>Returns SF_TRUE if SFC_RF64_AUTO_DOWNGRADE is set and SF_FALSE
cannam@125 1854 otherwise.
cannam@125 1855 </DL>
cannam@125 1856
cannam@125 1857
cannam@125 1858
cannam@125 1859 <!-- ========================================================================= -->
cannam@125 1860
cannam@125 1861
cannam@125 1862 <HR>
cannam@125 1863 <P>
cannam@125 1864 The libsndfile home page is here :
cannam@125 1865 <A HREF="http://www.mega-nerd.com/libsndfile/">
cannam@125 1866 http://www.mega-nerd.com/libsndfile/</A>.
cannam@125 1867 <BR>
cannam@125 1868 Version : 1.0.25
cannam@125 1869 </P>
cannam@125 1870
cannam@125 1871 </BODY>
cannam@125 1872 </HTML>