More whitespace and cstyle fixes.

This commit is contained in:
Erik de Castro Lopo 2012-01-21 14:24:38 +11:00
parent 18c1105981
commit 8508ec5679
42 changed files with 237 additions and 237 deletions

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** All rights reserved. ** All rights reserved.
** **

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2008-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** All rights reserved. ** All rights reserved.
** **

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2008 George Blood Audio ** Copyright (C) 2008 George Blood Audio
** **
** All rights reserved. ** All rights reserved.
@ -43,7 +43,7 @@
#define BUFFER_LEN 4096 #define BUFFER_LEN 4096
#define MIN(x,y) ((x) < (y) ? (x) : (y)) #define MIN(x, y) ((x) < (y) ? (x) : (y))
void void
sfe_copy_data_fp (SNDFILE *outfile, SNDFILE *infile, int channels) sfe_copy_data_fp (SNDFILE *outfile, SNDFILE *infile, int channels)

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** All rights reserved. ** All rights reserved.
** **
@ -32,7 +32,7 @@
#define ARRAY_LEN(x) ((int) (sizeof (x) / sizeof (x [0]))) #define ARRAY_LEN(x) ((int) (sizeof (x) / sizeof (x [0])))
#define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b))
typedef struct typedef struct
{ const char * title ; { const char * title ;

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** All rights reserved. ** All rights reserved.
** **

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** All rights reserved. ** All rights reserved.
** **

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2008-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2008-2010 George Blood Audio ** Copyright (C) 2008-2010 George Blood Audio
** **
** All rights reserved. ** All rights reserved.
@ -131,14 +131,14 @@ process_args (SNDFILE * file, const SF_BROADCAST_INFO_2K * binfo, int argc, char
{ const char * str ; { const char * str ;
int k, do_all = 0 ; int k, do_all = 0 ;
#define HANDLE_BEXT_ARG(cmd,name,field) \ #define HANDLE_BEXT_ARG(cmd, name, field) \
if (do_all || strcmp (argv [k], cmd) == 0) \ if (do_all || strcmp (argv [k], cmd) == 0) \
{ printf ("%-20s : %.*s\n", name, (int) sizeof (binfo->field), binfo->field) ; \ { printf ("%-20s : %.*s\n", name, (int) sizeof (binfo->field), binfo->field) ; \
if (! do_all) \ if (! do_all) \
continue ; \ continue ; \
} ; } ;
#define HANDLE_STR_ARG(cmd,name,id) \ #define HANDLE_STR_ARG(cmd, name, id) \
if (do_all || strcmp (argv [k], cmd) == 0) \ if (do_all || strcmp (argv [k], cmd) == 0) \
{ str = sf_get_string (file, id) ; \ { str = sf_get_string (file, id) ; \
printf ("%-20s : %s\n", name, str ? str : "") ; \ printf ("%-20s : %s\n", name, str ? str : "") ; \

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2008-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2008-2010 George Blood Audio ** Copyright (C) 2008-2010 George Blood Audio
** **
** All rights reserved. ** All rights reserved.
@ -87,7 +87,7 @@ main (int argc, char *argv [])
continue ; continue ;
} ; } ;
#define HANDLE_BEXT_ARG(cmd,field) \ #define HANDLE_BEXT_ARG(cmd, field) \
if (strcmp (argv [k], cmd) == 0) \ if (strcmp (argv [k], cmd) == 0) \
{ k ++ ; \ { k ++ ; \
if (k == argc) missing_param (argv [k - 1]) ; \ if (k == argc) missing_param (argv [k - 1]) ; \
@ -104,7 +104,7 @@ main (int argc, char *argv [])
HANDLE_BEXT_ARG ("--bext-coding-hist", coding_history) ; HANDLE_BEXT_ARG ("--bext-coding-hist", coding_history) ;
HANDLE_BEXT_ARG ("--bext-time-ref", time_ref) ; HANDLE_BEXT_ARG ("--bext-time-ref", time_ref) ;
#define HANDLE_STR_ARG(cmd,field) \ #define HANDLE_STR_ARG(cmd, field) \
if (strcmp (argv [k], cmd) == 0) \ if (strcmp (argv [k], cmd) == 0) \
{ k ++ ; \ { k ++ ; \
if (k == argc) missing_param (argv [k - 1]) ; \ if (k == argc) missing_param (argv [k - 1]) ; \

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2006-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2006-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2006 Paul Davis <paul@linuxaudiosystems.com> ** Copyright (C) 2006 Paul Davis <paul@linuxaudiosystems.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2001-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2001-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by

View File

@ -93,20 +93,20 @@
#define NOT(x) (! (x)) #define NOT(x) (! (x))
#if (COMPILER_IS_GCC == 1) #if (COMPILER_IS_GCC == 1)
#define SF_MAX(x,y) ({ \ #define SF_MAX(x, y) ({ \
typeof (x) sf_max_x1 = (x) ; \ typeof (x) sf_max_x1 = (x) ; \
typeof (y) sf_max_y1 = (y) ; \ typeof (y) sf_max_y1 = (y) ; \
(void) (&sf_max_x1 == &sf_max_y1) ; \ (void) (&sf_max_x1 == &sf_max_y1) ; \
sf_max_x1 > sf_max_y1 ? sf_max_x1 : sf_max_y1 ; }) sf_max_x1 > sf_max_y1 ? sf_max_x1 : sf_max_y1 ; })
#define SF_MIN(x,y) ({ \ #define SF_MIN(x, y) ({ \
typeof (x) sf_min_x2 = (x) ; \ typeof (x) sf_min_x2 = (x) ; \
typeof (y) sf_min_y2 = (y) ; \ typeof (y) sf_min_y2 = (y) ; \
(void) (&sf_min_x2 == &sf_min_y2) ; \ (void) (&sf_min_x2 == &sf_min_y2) ; \
sf_min_x2 < sf_min_y2 ? sf_min_x2 : sf_min_y2 ; }) sf_min_x2 < sf_min_y2 ? sf_min_x2 : sf_min_y2 ; })
#else #else
#define SF_MAX(a,b) ((a) > (b) ? (a) : (b)) #define SF_MAX(a, b) ((a) > (b) ? (a) : (b))
#define SF_MIN(a,b) ((a) < (b) ? (a) : (b)) #define SF_MIN(a, b) ((a) < (b) ? (a) : (b))
#endif #endif

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by
@ -461,7 +461,7 @@ dump_bits (DWVW_PRIVATE *pdwvw)
} /* dump_bits */ } /* dump_bits */
#endif #endif
#define HIGHEST_BIT(x,count) \ #define HIGHEST_BIT(x, count) \
{ int y = x ; \ { int y = x ; \
(count) = 0 ; \ (count) = 0 ; \
while (y) \ while (y) \

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2001-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2001-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by
@ -165,7 +165,8 @@ ircam_read_header (SF_PRIVATE *psf)
psf_log_printf (psf, " Sample Rate : %d\n" psf_log_printf (psf, " Sample Rate : %d\n"
" Channels : %d\n" " Channels : %d\n"
" Encoding : %X => %s\n", psf->sf.samplerate, psf->sf.channels, encoding, get_encoding_str (encoding)) ; " Encoding : %X => %s\n",
psf->sf.samplerate, psf->sf.channels, encoding, get_encoding_str (encoding)) ;
switch (encoding) switch (encoding)
{ case IRCAM_PCM_16 : { case IRCAM_PCM_16 :

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** Copyright (C) 2007 John ffitch ** Copyright (C) 2007 John ffitch
** **
** This program is free software ; you can redistribute it and/or modify ** This program is free software ; you can redistribute it and/or modify

View File

@ -349,10 +349,10 @@ vorbis_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
#if 0 #if 0
ret = vorbis_encode_init (&vdata->vinfo, psf->sf.channels, psf->sf.samplerate, -1, 128000, -1) ; /* average bitrate mode */ ret = vorbis_encode_init (&vdata->vinfo, psf->sf.channels, psf->sf.samplerate, -1, 128000, -1) ; /* average bitrate mode */
ret = ( vorbis_encode_setup_managed (&vdata->vinfo, psf->sf.channels, ret = ( vorbis_encode_setup_managed (&vdata->vinfo, psf->sf.channels, psf->sf.samplerate, -1, 128000, -1)
psf->sf.samplerate, -1, 128000, -1) || || vorbis_encode_ctl (&vdata->vinfo, OV_ECTL_RATEMANAGE_AVG, NULL)
vorbis_encode_ctl (&vdata->vinfo, OV_ECTL_RATEMANAGE_AVG, NULL) || || vorbis_encode_setup_init (&vdata->vinfo)
vorbis_encode_setup_init (&vdata->vinfo)) ; ) ;
#endif #endif
if (ret) if (ret)
return SFE_BAD_OPEN_FORMAT ; return SFE_BAD_OPEN_FORMAT ;

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by
@ -61,9 +61,9 @@ typedef __int64 int64_t ;
*/ */
#if (CPU_IS_LITTLE_ENDIAN == 1) #if (CPU_IS_LITTLE_ENDIAN == 1)
#define MAKE_MARKER(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24)) #define MAKE_MARKER(a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
#elif (CPU_IS_BIG_ENDIAN == 1) #elif (CPU_IS_BIG_ENDIAN == 1)
#define MAKE_MARKER(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) #define MAKE_MARKER(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
#else #else
#error "Target CPU endian-ness unknown. May need to hand edit src/sfconfig.h" #error "Target CPU endian-ness unknown. May need to hand edit src/sfconfig.h"
#endif #endif

View File

@ -165,8 +165,7 @@ ErrorStruct SndfileErrors [] =
{ SFE_AU_EMBED_BAD_LEN , "Embedded AU file with unknown length." }, { SFE_AU_EMBED_BAD_LEN , "Embedded AU file with unknown length." },
{ SFE_RAW_READ_BAD_SPEC , "Error while opening RAW file for read. Must specify format and channels.\n" { SFE_RAW_READ_BAD_SPEC , "Error while opening RAW file for read. Must specify format and channels.\n"
"Possibly trying to open unsupported format." "Possibly trying to open unsupported format." },
},
{ SFE_RAW_BAD_BITWIDTH , "Error. RAW file bitwidth must be a multiple of 8." }, { SFE_RAW_BAD_BITWIDTH , "Error. RAW file bitwidth must be a multiple of 8." },
{ SFE_RAW_BAD_FORMAT , "Error. Bad format field in SF_INFO struct when openning a RAW file for read." }, { SFE_RAW_BAD_FORMAT , "Error. Bad format field in SF_INFO struct when openning a RAW file for read." },
@ -288,7 +287,7 @@ static char sf_syserr [SF_SYSERR_LEN] = { 0 } ;
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
*/ */
#define VALIDATE_SNDFILE_AND_ASSIGN_PSF(a,b,c) \ #define VALIDATE_SNDFILE_AND_ASSIGN_PSF(a, b, c) \
{ if ((a) == NULL) \ { if ((a) == NULL) \
{ sf_errno = SFE_BAD_SNDFILE_PTR ; \ { sf_errno = SFE_BAD_SNDFILE_PTR ; \
return 0 ; \ return 0 ; \

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2006-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2006-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by
@ -33,7 +33,7 @@
** This is a bit rough, but it is the nicest way to do it. ** This is a bit rough, but it is the nicest way to do it.
*/ */
#define cmp_test(line,ival,tval,str) \ #define cmp_test(line, ival, tval, str) \
if (ival != tval) \ if (ival != tval) \
{ printf (str, line, ival, tval) ; \ { printf (str, line, ival, tval) ; \
exit (1) ; \ exit (1) ; \

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2003-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2003-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by
@ -28,35 +28,35 @@
#include "test_main.h" #include "test_main.h"
#define CMP_0_ARGS(line,err,fmt) \ #define CMP_0_ARGS(line, err, fmt) \
{ psf->logindex = 0 ; \ { psf->logindex = 0 ; \
snprintf (buffer, sizeof (buffer), (fmt)) ; \ snprintf (buffer, sizeof (buffer), (fmt)) ; \
psf_log_printf (psf, (fmt)) ; \ psf_log_printf (psf, (fmt)) ; \
err += compare_strings_or_die (line, fmt, buffer, psf->logbuffer) ; \ err += compare_strings_or_die (line, fmt, buffer, psf->logbuffer) ; \
} }
#define CMP_2_ARGS(line,err,fmt,a) \ #define CMP_2_ARGS(line, err, fmt, a) \
{ psf->logindex = 0 ; \ { psf->logindex = 0 ; \
snprintf (buffer, sizeof (buffer), (fmt), (a), (a)) ; \ snprintf (buffer, sizeof (buffer), (fmt), (a), (a)) ; \
psf_log_printf (psf, (fmt), (a), (a)) ; \ psf_log_printf (psf, (fmt), (a), (a)) ; \
err += compare_strings_or_die (line, fmt, buffer, psf->logbuffer) ; \ err += compare_strings_or_die (line, fmt, buffer, psf->logbuffer) ; \
} }
#define CMP_4_ARGS(line,err,fmt,a) \ #define CMP_4_ARGS(line, err, fmt, a) \
{ psf->logindex = 0 ; \ { psf->logindex = 0 ; \
snprintf (buffer, sizeof (buffer), (fmt), (a), (a), (a), (a)) ; \ snprintf (buffer, sizeof (buffer), (fmt), (a), (a), (a), (a)) ; \
psf_log_printf (psf, (fmt), (a), (a), (a), (a)) ; \ psf_log_printf (psf, (fmt), (a), (a), (a), (a)) ; \
err += compare_strings_or_die (line, fmt, buffer, psf->logbuffer) ; \ err += compare_strings_or_die (line, fmt, buffer, psf->logbuffer) ; \
} }
#define CMP_5_ARGS(line,err,fmt,a) \ #define CMP_5_ARGS(line, err, fmt, a) \
{ psf->logindex = 0 ; \ { psf->logindex = 0 ; \
snprintf (buffer, sizeof (buffer), (fmt), (a), (a), (a), (a), (a)) ; \ snprintf (buffer, sizeof (buffer), (fmt), (a), (a), (a), (a), (a)) ; \
psf_log_printf (psf, (fmt), (a), (a), (a), (a), (a)) ; \ psf_log_printf (psf, (fmt), (a), (a), (a), (a), (a)) ; \
err += compare_strings_or_die (line, fmt, buffer, psf->logbuffer) ; \ err += compare_strings_or_die (line, fmt, buffer, psf->logbuffer) ; \
} }
#define CMP_6_ARGS(line,err,fmt,a) \ #define CMP_6_ARGS(line, err, fmt, a) \
{ psf->logindex = 0 ; \ { psf->logindex = 0 ; \
snprintf (buffer, sizeof (buffer), (fmt), (a), (a), (a), (a), (a), (a)) ; \ snprintf (buffer, sizeof (buffer), (fmt), (a), (a), (a), (a), (a), (a)) ; \
psf_log_printf (psf, (fmt), (a), (a), (a), (a), (a), (a)) ; \ psf_log_printf (psf, (fmt), (a), (a), (a), (a), (a), (a)) ; \

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by ** it under the terms of the GNU Lesser General Public License as published by
@ -37,13 +37,13 @@
** header. ** header.
*/ */
#define MAKE_HASH16(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,xa,xb,xc,xd,xe,xf) \ #define MAKE_HASH16(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xa, xb, xc, xd, xe, xf) \
( (x0) ^ ((x1) << 1) ^ ((x2) << 2) ^ ((x3) << 3) ^ \ ( (x0) ^ ((x1) << 1) ^ ((x2) << 2) ^ ((x3) << 3) ^ \
((x4) << 4) ^ ((x5) << 5) ^ ((x6) << 6) ^ ((x7) << 7) ^ \ ((x4) << 4) ^ ((x5) << 5) ^ ((x6) << 6) ^ ((x7) << 7) ^ \
((x8) << 8) ^ ((x9) << 9) ^ ((xa) << 10) ^ ((xb) << 11) ^ \ ((x8) << 8) ^ ((x9) << 9) ^ ((xa) << 10) ^ ((xb) << 11) ^ \
((xc) << 12) ^ ((xd) << 13) ^ ((xe) << 14) ^ ((xf) << 15) ) ((xc) << 12) ^ ((xd) << 13) ^ ((xe) << 14) ^ ((xf) << 15) )
#define MAKE_MARKER16(name,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,xa,xb,xc,xd,xe,xf) \ #define MAKE_MARKER16(name, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xa, xb, xc, xd, xe, xf) \
static unsigned char name [16] = { (x0), (x1), (x2), (x3), (x4), (x5), \ static unsigned char name [16] = { (x0), (x1), (x2), (x3), (x4), (x5), \
(x6), (x7), (x8), (x9), (xa), (xb), (xc), (xd), (xe), (xf) } (x6), (x7), (x8), (x9), (xa), (xb), (xc), (xd), (xe), (xf) }

View File

@ -7,7 +7,7 @@ data_type = {
data_type = { data_type = {
type_name = int ; type_name = int ;
multiplier = "32700.0 * (1<<16)" ; multiplier = "32700.0 * (1 << 16)" ;
}; };
data_type = { data_type = {

View File

@ -1,6 +1,6 @@
[+ AutoGen5 template c +] [+ AutoGen5 template c +]
/* /*
** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by ** it under the terms of the GNU General Public License as published by
@ -60,7 +60,7 @@
#define WRITE_PERMS (S_IRUSR | S_IWUSR | S_IRGRP) #define WRITE_PERMS (S_IRUSR | S_IWUSR | S_IRGRP)
#endif #endif
#define BUFFER_SIZE (1<<18) #define BUFFER_SIZE (1 << 18)
#define BLOCK_COUNT (30) #define BLOCK_COUNT (30)
#define TEST_DURATION (5) /* 5 Seconds. */ #define TEST_DURATION (5) /* 5 Seconds. */

View File

@ -50,7 +50,7 @@ main (int argc, char *argv [])
exit (1) ; exit (1) ;
} ; } ;
do_all =! strcmp (argv [1], "all") ; do_all = ! strcmp (argv [1], "all") ;
if (do_all || ! strcmp (argv [1], "wav")) if (do_all || ! strcmp (argv [1], "wav"))
{ chunk_test ("chunks.wav", SF_FORMAT_WAV) ; { chunk_test ("chunks.wav", SF_FORMAT_WAV) ;

View File

@ -81,7 +81,7 @@ main (int argc, char *argv [])
exit (1) ; exit (1) ;
} ; } ;
do_all =! strcmp (argv [1], "all") ; do_all = ! strcmp (argv [1], "all") ;
if (do_all || strcmp (argv [1], "ver") == 0) if (do_all || strcmp (argv [1], "ver") == 0)
{ char buffer [128] ; { char buffer [128] ;

View File

@ -52,7 +52,7 @@ main (int argc, char *argv [])
exit (1) ; exit (1) ;
} ; } ;
do_all =! strcmp (argv [1], "all") ; do_all = ! strcmp (argv [1], "all") ;
if (do_all || ! strcmp (argv [1], "wav")) if (do_all || ! strcmp (argv [1], "wav"))
{ dither_test ("dither.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_U8) ; { dither_test ("dither.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_U8) ;

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2007-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2007-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by ** it under the terms of the GNU General Public License as published by
@ -26,7 +26,7 @@
#include "utils.h" #include "utils.h"
#include "generate.h" #include "generate.h"
#define SF_MAX(x,y) ((x) > (y) ? (x) : (y)) #define SF_MAX(x, y) ((x) > (y) ? (x) : (y))
static float crappy_snare (float *output, int len, int offset, float gain, float maxabs) ; static float crappy_snare (float *output, int len, int offset, float gain, float maxabs) ;

View File

@ -1,6 +1,6 @@
[+ AutoGen5 template c +] [+ AutoGen5 template c +]
/* /*
** Copyright (C) 2001-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2001-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software ; you can redistribute it and/or modify ** This program is free software ; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by ** it under the terms of the GNU General Public License as published by
@ -43,7 +43,7 @@
#include "utils.h" #include "utils.h"
#define BUFFER_LEN (1<<10) #define BUFFER_LEN (1 << 10)
#define LOG_BUFFER_SIZE 1024 #define LOG_BUFFER_SIZE 1024
static void update_header_test (const char *filename, int typemajor) ; static void update_header_test (const char *filename, int typemajor) ;
@ -77,7 +77,7 @@ main (int argc, char *argv [])
exit (1) ; exit (1) ;
} ; } ;
do_all=!strcmp (argv [1], "all") ; do_all= !strcmp (argv [1], "all") ;
if (do_all || ! strcmp (argv [1], "wav")) if (do_all || ! strcmp (argv [1], "wav"))
{ update_header_test ("header.wav", SF_FORMAT_WAV) ; { update_header_test ("header.wav", SF_FORMAT_WAV) ;

View File

@ -38,7 +38,7 @@
#define M_PI 3.14159265358979323846264338 #define M_PI 3.14159265358979323846264338
#endif #endif
#define LCT_MAX(x,y) ((x) > (y) ? (x) : (y)) #define LCT_MAX(x, y) ((x) > (y) ? (x) : (y))
static void lcomp_test_short (const char *filename, int filetype, int chan, double margin) ; static void lcomp_test_short (const char *filename, int filetype, int chan, double margin) ;
static void lcomp_test_int (const char *filename, int filetype, int chan, double margin) ; static void lcomp_test_int (const char *filename, int filetype, int chan, double margin) ;

View File

@ -65,7 +65,7 @@ main (int argc, char *argv [])
exit (1) ; exit (1) ;
} ; } ;
do_all =! strcmp (argv [1], "all") ; do_all = ! strcmp (argv [1], "all") ;
if (do_all || ! strcmp (argv [1], "wav")) if (do_all || ! strcmp (argv [1], "wav"))
{ zero_data_test ("zerolen.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_16) ; { zero_data_test ("zerolen.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_16) ;

View File

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2001-2011 Erik de Castro Lopo <erikd@mega-nerd.com> ** Copyright (C) 2001-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
** **
** This program is free software; you can redistribute it and/or modify ** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by ** it under the terms of the GNU General Public License as published by
@ -43,7 +43,7 @@ main (int argc, char *argv [])
exit (1) ; exit (1) ;
} ; } ;
do_all =! strcmp (argv [1], "all") ; do_all = ! strcmp (argv [1], "all") ;
if (do_all || ! strcmp (argv [1], "raw")) if (do_all || ! strcmp (argv [1], "raw"))
{ stdout_test (SF_FORMAT_RAW, PIPE_TEST_LEN) ; { stdout_test (SF_FORMAT_RAW, PIPE_TEST_LEN) ;

View File

@ -62,7 +62,7 @@ main (int argc, char *argv [])
exit (1) ; exit (1) ;
} ; } ;
do_all =! strcmp (argv [1], "all") ; do_all = ! strcmp (argv [1], "all") ;
if (do_all || ! strcmp (argv [1], "wav")) if (do_all || ! strcmp (argv [1], "wav"))
{ string_start_end_test ("strings.wav", SF_FORMAT_WAV) ; { string_start_end_test ("strings.wav", SF_FORMAT_WAV) ;
@ -631,7 +631,7 @@ str_count (const char * haystack, const char * needle)
return count ; return count ;
} /* str_count */ } /* str_count */
#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b))
static void static void
software_string_test (const char *filename) software_string_test (const char *filename)

View File

@ -405,12 +405,12 @@ main (int argc, char **argv)
static void create_short_file (const char *filename) ; static void create_short_file (const char *filename) ;
#define CHAR_ERROR(x,y) (abs ((x) - (y)) > 255) #define CHAR_ERROR(x, y) (abs ((x) - (y)) > 255)
#define INT_ERROR(x,y) (((x) - (y)) != 0) #define INT_ERROR(x, y) (((x) - (y)) != 0)
#define TRIBYTE_ERROR(x,y) (abs ((x) - (y)) > 255) #define TRIBYTE_ERROR(x, y) (abs ((x) - (y)) > 255)
#define FLOAT_ERROR(x,y) (fabs ((x) - (y)) > 1e-5) #define FLOAT_ERROR(x, y) (fabs ((x) - (y)) > 1e-5)
#define CONVERT_DATA(k,len,new,orig) \ #define CONVERT_DATA(k, len, new, orig) \
{ for ((k) = 0 ; (k) < (len) ; (k) ++) \ { for ((k) = 0 ; (k) < (len) ; (k) ++) \
(new) [k] = (orig) [k] ; \ (new) [k] = (orig) [k] ; \
} }