Chris@0: /* Chris@0: ** Copyright (C) 1999-2011 Erik de Castro Lopo Chris@0: ** Chris@0: ** All rights reserved. Chris@0: ** Chris@0: ** Redistribution and use in source and binary forms, with or without Chris@0: ** modification, are permitted provided that the following conditions are Chris@0: ** met: Chris@0: ** Chris@0: ** * Redistributions of source code must retain the above copyright Chris@0: ** notice, this list of conditions and the following disclaimer. Chris@0: ** * Redistributions in binary form must reproduce the above copyright Chris@0: ** notice, this list of conditions and the following disclaimer in Chris@0: ** the documentation and/or other materials provided with the Chris@0: ** distribution. Chris@0: ** * Neither the author nor the names of any contributors may be used Chris@0: ** to endorse or promote products derived from this software without Chris@0: ** specific prior written permission. Chris@0: ** Chris@0: ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS Chris@0: ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Chris@0: ** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR Chris@0: ** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR Chris@0: ** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, Chris@0: ** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, Chris@0: ** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; Chris@0: ** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, Chris@0: ** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR Chris@0: ** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF Chris@0: ** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Chris@0: */ Chris@0: Chris@0: Chris@0: #define ARRAY_LEN(x) ((int) (sizeof (x) / sizeof (x [0]))) Chris@0: #define MAX(a,b) ((a) > (b) ? (a) : (b)) Chris@0: Chris@0: typedef struct Chris@0: { const char * title ; Chris@0: const char * copyright ; Chris@0: const char * artist ; Chris@0: const char * comment ; Chris@0: const char * date ; Chris@0: const char * album ; Chris@0: const char * license ; Chris@0: Chris@0: Chris@0: /* Stuff to go in the 'bext' chunk of WAV files. */ Chris@0: int has_bext_fields ; Chris@0: int coding_hist_append ; Chris@0: Chris@0: const char * description ; Chris@0: const char * originator ; Chris@0: const char * originator_reference ; Chris@0: const char * origination_date ; Chris@0: const char * origination_time ; Chris@0: const char * umid ; Chris@0: const char * coding_history ; Chris@0: const char * time_ref ; Chris@0: } METADATA_INFO ; Chris@0: Chris@0: typedef SF_BROADCAST_INFO_VAR (2048) SF_BROADCAST_INFO_2K ; Chris@0: Chris@0: void sfe_apply_metadata_changes (const char * filenames [2], const METADATA_INFO * info) ; Chris@0: Chris@0: void sfe_copy_data_fp (SNDFILE *outfile, SNDFILE *infile, int channels) ; Chris@0: Chris@0: void sfe_copy_data_int (SNDFILE *outfile, SNDFILE *infile, int channels) ; Chris@0: Chris@0: int sfe_file_type_of_ext (const char *filename, int format) ; Chris@0: Chris@0: void sfe_dump_format_map (void) ; Chris@0: Chris@0: const char * program_name (const char * argv0) ;