2 ** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
4 ** All rights reserved.
6 ** Redistribution and use in source and binary forms, with or without
7 ** modification, are permitted provided that the following conditions are
10 ** * Redistributions of source code must retain the above copyright
11 ** notice, this list of conditions and the following disclaimer.
12 ** * Redistributions in binary form must reproduce the above copyright
13 ** notice, this list of conditions and the following disclaimer in
14 ** the documentation and/or other materials provided with the
16 ** * Neither the author nor the names of any contributors may be used
17 ** to endorse or promote products derived from this software without
18 ** specific prior written permission.
20 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 ** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 ** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 ** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 ** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 ** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 ** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 ** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 ** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 ** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 #define ARRAY_LEN(x) ((int) (sizeof (x) / sizeof (x [0])))
35 #define MAX(a,b) ((a) > (b) ? (a) : (b))
38 { const char * title
;
39 const char * copyright
;
41 const char * comment
;
44 const char * license
;
47 /* Stuff to go in the 'bext' chunk of WAV files. */
49 int coding_hist_append
;
51 const char * description
;
52 const char * originator
;
53 const char * originator_reference
;
54 const char * origination_date
;
55 const char * origination_time
;
57 const char * coding_history
;
58 const char * time_ref
;
61 typedef SF_BROADCAST_INFO_VAR (2048) SF_BROADCAST_INFO_2K
;
63 void sfe_apply_metadata_changes (const char * filenames
[2], const METADATA_INFO
* info
) ;
65 void sfe_copy_data_fp (SNDFILE
*outfile
, SNDFILE
*infile
, int channels
) ;
67 void sfe_copy_data_int (SNDFILE
*outfile
, SNDFILE
*infile
, int channels
) ;
69 int sfe_file_type_of_ext (const char *filename
, int format
) ;
71 void sfe_dump_format_map (void) ;
73 const char * program_name (const char * argv0
) ;