SAL
A C++ library for spatial audio.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sndfile.h
Go to the documentation of this file.
1 /*
2 ** Copyright (C) 1999-2011Erik de Castro Lopo <erikd@mega-nerd.com>
3 **
4 ** This program is free software; you can redistribute it and/or modify
5 ** it under the terms of the GNU Lesser General Public License as published by
6 ** the Free Software Foundation; either version 2.1 of the License, or
7 ** (at your option) any later version.
8 **
9 ** This program is distributed in the hope that it will be useful,
10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ** GNU Lesser General Public License for more details.
13 **
14 ** You should have received a copy of the GNU Lesser General Public License
15 ** along with this program; if not, write to the Free Software
16 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18 
19 /*
20 ** sndfile.h -- system-wide definitions
21 **
22 ** API documentation is in the doc/ directory of the source code tarball
23 ** and at http://www.mega-nerd.com/libsndfile/api.html.
24 */
25 
26 #ifndef SNDFILE_H
27 #define SNDFILE_H
28 
29 /* This is the version 1.0.X header file. */
30 #define SNDFILE_1
31 
32 #include <sys/types.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /* __cplusplus */
37 
38 /* The following file types can be read and written.
39 ** A file type would consist of a major type (ie SF_FORMAT_WAV) bitwise
40 ** ORed with a minor type (ie SF_FORMAT_PCM). SF_FORMAT_TYPEMASK and
41 ** SF_FORMAT_SUBMASK can be used to separate the major and minor file
42 ** types.
43 */
44 
45 enum
46 { /* Major formats. */
47  SF_FORMAT_WAV = 0x010000, /* Microsoft WAV format (little endian default). */
48  SF_FORMAT_AIFF = 0x020000, /* Apple/SGI AIFF format (big endian). */
49  SF_FORMAT_AU = 0x030000, /* Sun/NeXT AU format (big endian). */
50  SF_FORMAT_RAW = 0x040000, /* RAW PCM data. */
51  SF_FORMAT_PAF = 0x050000, /* Ensoniq PARIS file format. */
52  SF_FORMAT_SVX = 0x060000, /* Amiga IFF / SVX8 / SV16 format. */
53  SF_FORMAT_NIST = 0x070000, /* Sphere NIST format. */
54  SF_FORMAT_VOC = 0x080000, /* VOC files. */
55  SF_FORMAT_IRCAM = 0x0A0000, /* Berkeley/IRCAM/CARL */
56  SF_FORMAT_W64 = 0x0B0000, /* Sonic Foundry's 64 bit RIFF/WAV */
57  SF_FORMAT_MAT4 = 0x0C0000, /* Matlab (tm) V4.2 / GNU Octave 2.0 */
58  SF_FORMAT_MAT5 = 0x0D0000, /* Matlab (tm) V5.0 / GNU Octave 2.1 */
59  SF_FORMAT_PVF = 0x0E0000, /* Portable Voice Format */
60  SF_FORMAT_XI = 0x0F0000, /* Fasttracker 2 Extended Instrument */
61  SF_FORMAT_HTK = 0x100000, /* HMM Tool Kit format */
62  SF_FORMAT_SDS = 0x110000, /* Midi Sample Dump Standard */
63  SF_FORMAT_AVR = 0x120000, /* Audio Visual Research */
64  SF_FORMAT_WAVEX = 0x130000, /* MS WAVE with WAVEFORMATEX */
65  SF_FORMAT_SD2 = 0x160000, /* Sound Designer 2 */
66  SF_FORMAT_FLAC = 0x170000, /* FLAC lossless file format */
67  SF_FORMAT_CAF = 0x180000, /* Core Audio File format */
68  SF_FORMAT_WVE = 0x190000, /* Psion WVE format */
69  SF_FORMAT_OGG = 0x200000, /* Xiph OGG container */
70  SF_FORMAT_MPC2K = 0x210000, /* Akai MPC 2000 sampler */
71  SF_FORMAT_RF64 = 0x220000, /* RF64 WAV file */
72 
73  /* Subtypes from here on. */
74 
75  SF_FORMAT_PCM_S8 = 0x0001, /* Signed 8 bit data */
76  SF_FORMAT_PCM_16 = 0x0002, /* Signed 16 bit data */
77  SF_FORMAT_PCM_24 = 0x0003, /* Signed 24 bit data */
78  SF_FORMAT_PCM_32 = 0x0004, /* Signed 32 bit data */
79 
80  SF_FORMAT_PCM_U8 = 0x0005, /* Unsigned 8 bit data (WAV and RAW only) */
81 
82  SF_FORMAT_FLOAT = 0x0006, /* 32 bit float data */
83  SF_FORMAT_DOUBLE = 0x0007, /* 64 bit float data */
84 
85  SF_FORMAT_ULAW = 0x0010, /* U-Law encoded. */
86  SF_FORMAT_ALAW = 0x0011, /* A-Law encoded. */
87  SF_FORMAT_IMA_ADPCM = 0x0012, /* IMA ADPCM. */
88  SF_FORMAT_MS_ADPCM = 0x0013, /* Microsoft ADPCM. */
89 
90  SF_FORMAT_GSM610 = 0x0020, /* GSM 6.10 encoding. */
91  SF_FORMAT_VOX_ADPCM = 0x0021, /* OKI / Dialogix ADPCM */
92 
93  SF_FORMAT_G721_32 = 0x0030, /* 32kbs G721 ADPCM encoding. */
94  SF_FORMAT_G723_24 = 0x0031, /* 24kbs G723 ADPCM encoding. */
95  SF_FORMAT_G723_40 = 0x0032, /* 40kbs G723 ADPCM encoding. */
96 
97  SF_FORMAT_DWVW_12 = 0x0040, /* 12 bit Delta Width Variable Word encoding. */
98  SF_FORMAT_DWVW_16 = 0x0041, /* 16 bit Delta Width Variable Word encoding. */
99  SF_FORMAT_DWVW_24 = 0x0042, /* 24 bit Delta Width Variable Word encoding. */
100  SF_FORMAT_DWVW_N = 0x0043, /* N bit Delta Width Variable Word encoding. */
101 
102  SF_FORMAT_DPCM_8 = 0x0050, /* 8 bit differential PCM (XI only) */
103  SF_FORMAT_DPCM_16 = 0x0051, /* 16 bit differential PCM (XI only) */
104 
105  SF_FORMAT_VORBIS = 0x0060, /* Xiph Vorbis encoding. */
106 
107  /* Endian-ness options. */
108 
109  SF_ENDIAN_FILE = 0x00000000, /* Default file endian-ness. */
110  SF_ENDIAN_LITTLE = 0x10000000, /* Force little endian-ness. */
111  SF_ENDIAN_BIG = 0x20000000, /* Force big endian-ness. */
112  SF_ENDIAN_CPU = 0x30000000, /* Force CPU endian-ness. */
113 
114  SF_FORMAT_SUBMASK = 0x0000FFFF,
115  SF_FORMAT_TYPEMASK = 0x0FFF0000,
116  SF_FORMAT_ENDMASK = 0x30000000
117 } ;
118 
119 /*
120 ** The following are the valid command numbers for the sf_command()
121 ** interface. The use of these commands is documented in the file
122 ** command.html in the doc directory of the source code distribution.
123 */
124 
125 enum
129 
130 
137 
140 
142 
147 
154 
157 
160 
162 
164 
167 
170 
172 
175 
178 
180 
183 
186 
188 
189  /* Support for Wavex Ambisonics Format */
192 
194 
195  /* Following commands for testing only. */
197 
198  /*
199  ** SFC_SET_ADD_* values are deprecated and will disappear at some
200  ** time in the future. They are guaranteed to be here up to and
201  ** including version 1.0.8 to avoid breakage of existng software.
202  ** They currently do nothing and will continue to do nothing.
203  */
206 } ;
207 
208 
209 /*
210 ** String types that can be set and read from files. Not all file types
211 ** support this and even the file types which support one, may not support
212 ** all string types.
213 */
214 
215 enum
216 { SF_STR_TITLE = 0x01,
221  SF_STR_DATE = 0x06,
222  SF_STR_ALBUM = 0x07,
226 } ;
227 
228 /*
229 ** Use the following as the start and end index when doing metadata
230 ** transcoding.
231 */
232 
233 #define SF_STR_FIRST SF_STR_TITLE
234 #define SF_STR_LAST SF_STR_LICENSE
235 
236 enum
237 { /* True and false */
238  SF_FALSE = 0,
239  SF_TRUE = 1,
240 
241  /* Modes for opening files. */
242  SFM_READ = 0x10,
243  SFM_WRITE = 0x20,
244  SFM_RDWR = 0x30,
245 
248 } ;
249 
250 /* Public error values. These are guaranteed to remain unchanged for the duration
251 ** of the library major version number.
252 ** There are also a large number of private error numbers which are internal to
253 ** the library which can change at any time.
254 */
255 
256 enum
262 } ;
263 
264 
265 /* Channel map values (used with SFC_SET/GET_CHANNEL_MAP).
266 */
267 
268 enum
271  SF_CHANNEL_MAP_LEFT, /* Apple calls this 'Left' */
272  SF_CHANNEL_MAP_RIGHT, /* Apple calls this 'Right' */
273  SF_CHANNEL_MAP_CENTER, /* Apple calls this 'Center' */
277  SF_CHANNEL_MAP_REAR_CENTER, /* Apple calls this 'Center Surround', Msft calls this 'Back Center' */
278  SF_CHANNEL_MAP_REAR_LEFT, /* Apple calls this 'Left Surround', Msft calls this 'Back Left' */
279  SF_CHANNEL_MAP_REAR_RIGHT, /* Apple calls this 'Right Surround', Msft calls this 'Back Right' */
280  SF_CHANNEL_MAP_LFE, /* Apple calls this 'LFEScreen', Msft calls this 'Low Frequency' */
281  SF_CHANNEL_MAP_FRONT_LEFT_OF_CENTER, /* Apple calls this 'Left Center' */
282  SF_CHANNEL_MAP_FRONT_RIGHT_OF_CENTER, /* Apple calls this 'Right Center */
283  SF_CHANNEL_MAP_SIDE_LEFT, /* Apple calls this 'Left Surround Direct' */
284  SF_CHANNEL_MAP_SIDE_RIGHT, /* Apple calls this 'Right Surround Direct' */
285  SF_CHANNEL_MAP_TOP_CENTER, /* Apple calls this 'Top Center Surround' */
286  SF_CHANNEL_MAP_TOP_FRONT_LEFT, /* Apple calls this 'Vertical Height Left' */
287  SF_CHANNEL_MAP_TOP_FRONT_RIGHT, /* Apple calls this 'Vertical Height Right' */
288  SF_CHANNEL_MAP_TOP_FRONT_CENTER, /* Apple calls this 'Vertical Height Center' */
289  SF_CHANNEL_MAP_TOP_REAR_LEFT, /* Apple and MS call this 'Top Back Left' */
290  SF_CHANNEL_MAP_TOP_REAR_RIGHT, /* Apple and MS call this 'Top Back Right' */
291  SF_CHANNEL_MAP_TOP_REAR_CENTER, /* Apple and MS call this 'Top Back Center' */
292 
297 
299 } ;
300 
301 
302 /* A SNDFILE* pointer can be passed around much like stdio.h's FILE* pointer. */
303 
304 typedef struct SNDFILE_tag SNDFILE ;
305 
306 /* The following typedef is system specific and is defined when libsndfile is
307 ** compiled. sf_count_t will be a 64 bit value when the underlying OS allows
308 ** 64 bit file offsets.
309 ** On windows, we need to allow the same header file to be compiler by both GCC
310 ** and the Microsoft compiler.
311 */
312 
313 #if (defined (_MSCVER) || defined (_MSC_VER))
314 typedef __int64 sf_count_t ;
315 #define SF_COUNT_MAX 0x7fffffffffffffffi64
316 #else
317 typedef int64_t sf_count_t ;
318 #define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
319 #endif
320 
321 
322 /* A pointer to a SF_INFO structure is passed to sf_open () and filled in.
323 ** On write, the SF_INFO structure is filled in by the user and passed into
324 ** sf_open ().
325 */
326 
327 struct SF_INFO
328 { sf_count_t frames ; /* Used to be called samples. Changed to avoid confusion. */
330  int channels ;
331  int format ;
332  int sections ;
333  int seekable ;
334 } ;
335 
336 typedef struct SF_INFO SF_INFO ;
337 
338 /* The SF_FORMAT_INFO struct is used to retrieve information about the sound
339 ** file formats libsndfile supports using the sf_command () interface.
340 **
341 ** Using this interface will allow applications to support new file formats
342 ** and encoding types when libsndfile is upgraded, without requiring
343 ** re-compilation of the application.
344 **
345 ** Please consult the libsndfile documentation (particularly the information
346 ** on the sf_command () interface) for examples of its use.
347 */
348 
349 typedef struct
350 { int format ;
351  const char *name ;
352  const char *extension ;
353 } SF_FORMAT_INFO ;
354 
355 /*
356 ** Enums and typedefs for adding dither on read and write.
357 ** See the html documentation for sf_command(), SFC_SET_DITHER_ON_WRITE
358 ** and SFC_SET_DITHER_ON_READ.
359 */
360 
361 enum
363  SFD_CUSTOM_LEVEL = 0x40000000,
364 
366  SFD_WHITE = 501,
368 } ;
369 
370 typedef struct
371 { int type ;
372  double level ;
373  const char *name ;
374 } SF_DITHER_INFO ;
375 
376 /* Struct used to retrieve information about a file embedded within a
377 ** larger file. See SFC_GET_EMBED_FILE_INFO.
378 */
379 
380 typedef struct
381 { sf_count_t offset ;
382  sf_count_t length ;
384 
385 /*
386 ** Structs used to retrieve music sample information from a file.
387 */
388 
389 enum
390 { /*
391  ** The loop mode field in SF_INSTRUMENT will be one of the following.
392  */
397 } ;
398 
399 typedef struct
400 { int gain ;
401  char basenote, detune ;
402  char velocity_lo, velocity_hi ;
403  char key_lo, key_hi ;
405 
406  struct
407  { int mode ;
408  unsigned int start ;
409  unsigned int end ;
410  unsigned int count ;
411  } loops [16] ; /* make variable in a sensible way */
412 } SF_INSTRUMENT ;
413 
414 
415 
416 /* Struct used to retrieve loop information from a file.*/
417 typedef struct
418 {
419  short time_sig_num ; /* any positive integer > 0 */
420  short time_sig_den ; /* any positive power of 2 > 0 */
421  int loop_mode ; /* see SF_LOOP enum */
422 
423  int num_beats ; /* this is NOT the amount of quarter notes !!!*/
424  /* a full bar of 4/4 is 4 beats */
425  /* a full bar of 7/8 is 7 beats */
426 
427  float bpm ; /* suggestion, as it can be calculated using other fields:*/
428  /* file's lenght, file's sampleRate and our time_sig_den*/
429  /* -> bpms are always the amount of _quarter notes_ per minute */
430 
431  int root_key ; /* MIDI note, or -1 for None */
432  int future [6] ;
433 } SF_LOOP_INFO ;
434 
435 
436 /* Struct used to retrieve broadcast (EBU) information from a file.
437 ** Strongly (!) based on EBU "bext" chunk format used in Broadcast WAVE.
438 */
439 #define SF_BROADCAST_INFO_VAR(coding_hist_size) \
440  struct \
441  { char description [256] ; \
442  char originator [32] ; \
443  char originator_reference [32] ; \
444  char origination_date [10] ; \
445  char origination_time [8] ; \
446  unsigned int time_reference_low ; \
447  unsigned int time_reference_high ; \
448  short version ; \
449  char umid [64] ; \
450  char reserved [190] ; \
451  unsigned int coding_history_size ; \
452  char coding_history [coding_hist_size] ; \
453  }
454 
455 /* SF_BROADCAST_INFO is the above struct with coding_history field of 256 bytes. */
456 typedef SF_BROADCAST_INFO_VAR (256) SF_BROADCAST_INFO ;
457 
458 
459 /* Virtual I/O functionality. */
460 
461 typedef sf_count_t (*sf_vio_get_filelen) (void *user_data) ;
462 typedef sf_count_t (*sf_vio_seek) (sf_count_t offset, int whence, void *user_data) ;
463 typedef sf_count_t (*sf_vio_read) (void *ptr, sf_count_t count, void *user_data) ;
464 typedef sf_count_t (*sf_vio_write) (const void *ptr, sf_count_t count, void *user_data) ;
465 typedef sf_count_t (*sf_vio_tell) (void *user_data) ;
466 
473 } ;
474 
475 typedef struct SF_VIRTUAL_IO SF_VIRTUAL_IO ;
476 
477 
478 /* Open the specified file for read, write or both. On error, this will
479 ** return a NULL pointer. To find the error number, pass a NULL SNDFILE
480 ** to sf_strerror ().
481 ** All calls to sf_open() should be matched with a call to sf_close().
482 */
483 
484 SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;
485 
486 
487 /* Use the existing file descriptor to create a SNDFILE object. If close_desc
488 ** is TRUE, the file descriptor will be closed when sf_close() is called. If
489 ** it is FALSE, the descritor will not be closed.
490 ** When passed a descriptor like this, the library will assume that the start
491 ** of file header is at the current file offset. This allows sound files within
492 ** larger container files to be read and/or written.
493 ** On error, this will return a NULL pointer. To find the error number, pass a
494 ** NULL SNDFILE to sf_strerror ().
495 ** All calls to sf_open_fd() should be matched with a call to sf_close().
496 
497 */
498 
499 SNDFILE* sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;
500 
501 SNDFILE* sf_open_virtual (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data) ;
502 
503 
504 /* sf_error () returns a error number which can be translated to a text
505 ** string using sf_error_number().
506 */
507 
508 int sf_error (SNDFILE *sndfile) ;
509 
510 
511 /* sf_strerror () returns to the caller a pointer to the current error message for
512 ** the given SNDFILE.
513 */
514 
515 const char* sf_strerror (SNDFILE *sndfile) ;
516 
517 
518 /* sf_error_number () allows the retrieval of the error string for each internal
519 ** error number.
520 **
521 */
522 
523 const char* sf_error_number (int errnum) ;
524 
525 
526 /* The following two error functions are deprecated but they will remain in the
527 ** library for the forseeable future. The function sf_strerror() should be used
528 ** in their place.
529 */
530 
531 int sf_perror (SNDFILE *sndfile) ;
532 int sf_error_str (SNDFILE *sndfile, char* str, size_t len) ;
533 
534 
535 /* Return TRUE if fields of the SF_INFO struct are a valid combination of values. */
536 
537 int sf_command (SNDFILE *sndfile, int command, void *data, int datasize) ;
538 
539 
540 /* Return TRUE if fields of the SF_INFO struct are a valid combination of values. */
541 
542 int sf_format_check (const SF_INFO *info) ;
543 
544 
545 /* Seek within the waveform data chunk of the SNDFILE. sf_seek () uses
546 ** the same values for whence (SEEK_SET, SEEK_CUR and SEEK_END) as
547 ** stdio.h function fseek ().
548 ** An offset of zero with whence set to SEEK_SET will position the
549 ** read / write pointer to the first data sample.
550 ** On success sf_seek returns the current position in (multi-channel)
551 ** samples from the start of the file.
552 ** Please see the libsndfile documentation for moving the read pointer
553 ** separately from the write pointer on files open in mode SFM_RDWR.
554 ** On error all of these functions return -1.
555 */
556 
557 sf_count_t sf_seek (SNDFILE *sndfile, sf_count_t frames, int whence) ;
558 
559 
560 /* Functions for retrieving and setting string data within sound files.
561 ** Not all file types support this features; AIFF and WAV do. For both
562 ** functions, the str_type parameter must be one of the SF_STR_* values
563 ** defined above.
564 ** On error, sf_set_string() returns non-zero while sf_get_string()
565 ** returns NULL.
566 */
567 
568 int sf_set_string (SNDFILE *sndfile, int str_type, const char* str) ;
569 
570 const char* sf_get_string (SNDFILE *sndfile, int str_type) ;
571 
572 
573 /* Return the library version string. */
574 
575 const char * sf_version_string (void) ;
576 
577 
578 /* Functions for reading/writing the waveform data of a sound file.
579 */
580 
581 sf_count_t sf_read_raw (SNDFILE *sndfile, void *ptr, sf_count_t bytes) ;
582 sf_count_t sf_write_raw (SNDFILE *sndfile, const void *ptr, sf_count_t bytes) ;
583 
584 
585 /* Functions for reading and writing the data chunk in terms of frames.
586 ** The number of items actually read/written = frames * number of channels.
587 ** sf_xxxx_raw read/writes the raw data bytes from/to the file
588 ** sf_xxxx_short passes data in the native short format
589 ** sf_xxxx_int passes data in the native int format
590 ** sf_xxxx_float passes data in the native float format
591 ** sf_xxxx_double passes data in the native double format
592 ** All of these read/write function return number of frames read/written.
593 */
594 
595 sf_count_t sf_readf_short (SNDFILE *sndfile, short *ptr, sf_count_t frames) ;
596 sf_count_t sf_writef_short (SNDFILE *sndfile, const short *ptr, sf_count_t frames) ;
597 
598 sf_count_t sf_readf_int (SNDFILE *sndfile, int *ptr, sf_count_t frames) ;
599 sf_count_t sf_writef_int (SNDFILE *sndfile, const int *ptr, sf_count_t frames) ;
600 
601 sf_count_t sf_readf_float (SNDFILE *sndfile, float *ptr, sf_count_t frames) ;
602 sf_count_t sf_writef_float (SNDFILE *sndfile, const float *ptr, sf_count_t frames) ;
603 
604 sf_count_t sf_readf_double (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
605 sf_count_t sf_writef_double (SNDFILE *sndfile, const double *ptr, sf_count_t frames) ;
606 
607 
608 /* Functions for reading and writing the data chunk in terms of items.
609 ** Otherwise similar to above.
610 ** All of these read/write function return number of items read/written.
611 */
612 
613 sf_count_t sf_read_short (SNDFILE *sndfile, short *ptr, sf_count_t items) ;
614 sf_count_t sf_write_short (SNDFILE *sndfile, const short *ptr, sf_count_t items) ;
615 
616 sf_count_t sf_read_int (SNDFILE *sndfile, int *ptr, sf_count_t items) ;
617 sf_count_t sf_write_int (SNDFILE *sndfile, const int *ptr, sf_count_t items) ;
618 
619 sf_count_t sf_read_float (SNDFILE *sndfile, float *ptr, sf_count_t items) ;
620 sf_count_t sf_write_float (SNDFILE *sndfile, const float *ptr, sf_count_t items) ;
621 
622 sf_count_t sf_read_double (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
623 sf_count_t sf_write_double (SNDFILE *sndfile, const double *ptr, sf_count_t items) ;
624 
625 
626 /* Close the SNDFILE and clean up all memory allocations associated with this
627 ** file.
628 ** Returns 0 on success, or an error number.
629 */
630 
631 int sf_close (SNDFILE *sndfile) ;
632 
633 
634 /* If the file is opened SFM_WRITE or SFM_RDWR, call fsync() on the file
635 ** to force the writing of data to disk. If the file is opened SFM_READ
636 ** no action is taken.
637 */
638 
639 void sf_write_sync (SNDFILE *sndfile) ;
640 
641 
642 
643 /* The function sf_wchar_open() is Windows Only!
644 ** Open a file passing in a Windows Unicode filename. Otherwise, this is
645 ** the same as sf_open().
646 **
647 ** In order for this to work, you need to do the following:
648 **
649 ** #include <windows.h>
650 ** #define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1
651 ** #including <sndfile.h>
652 */
653 
654 #if ENABLE_SNDFILE_WINDOWS_PROTOTYPES
655 SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
656 #endif
657 
658 
659 
660 #ifdef __cplusplus
661 } /* extern "C" */
662 #endif /* __cplusplus */
663 
664 #endif /* SNDFILE_H */
665