Source formatting (clang-format)

This commit is contained in:
Marcus Weseloh 2018-04-04 11:03:47 +02:00
parent 333e8a1295
commit 79c3bebaea
2 changed files with 1492 additions and 1472 deletions

File diff suppressed because it is too large Load diff

View file

@ -38,8 +38,7 @@ typedef struct _SFVersion
{ /* version structure */
unsigned short major;
unsigned short minor;
}
SFVersion;
} SFVersion;
typedef struct _SFMod
{ /* Modulator structure */
@ -48,36 +47,30 @@ typedef struct _SFMod
signed short amount; /* signed, degree of modulation */
unsigned short amtsrc; /* second source controls amnt of first */
unsigned short trans; /* transform applied to source */
}
SFMod;
} SFMod;
typedef union _SFGenAmount
{ /* Generator amount structure */
typedef union _SFGenAmount { /* Generator amount structure */
signed short sword; /* signed 16 bit value */
unsigned short uword; /* unsigned 16 bit value */
struct
{
unsigned char lo; /* low value for ranges */
unsigned char hi; /* high value for ranges */
}
range;
}
SFGenAmount;
} range;
} SFGenAmount;
typedef struct _SFGen
{ /* Generator structure */
unsigned short id; /* generator ID */
SFGenAmount amount; /* generator value */
}
SFGen;
} SFGen;
typedef struct _SFZone
{ /* Sample/instrument zone structure */
fluid_list_t *instsamp; /* instrument/sample pointer for zone */
fluid_list_t *gen; /* list of generators */
fluid_list_t *mod; /* list of modulators */
}
SFZone;
} SFZone;
typedef struct _SFSample
{ /* Sample structure */
@ -99,15 +92,13 @@ typedef struct _SFSample
signed char pitchadj; /* pitch correction in cents */
unsigned short sampletype; /* 1 mono,2 right,4 left,linked 8,0x8000=ROM */
fluid_sample_t *fluid_sample; /* Imported sample (fixed up in fluid_defsfont_load) */
}
SFSample;
} SFSample;
typedef struct _SFInst
{ /* Instrument structure */
char name[21]; /* Name of instrument */
fluid_list_t *zone; /* list of instrument zones */
}
SFInst;
} SFInst;
typedef struct _SFPreset
{ /* Preset structure */
@ -118,8 +109,7 @@ typedef struct _SFPreset
unsigned int genre; /* Not used (preserved) */
unsigned int morph; /* Not used (preserved) */
fluid_list_t *zone; /* list of preset zones */
}
SFPreset;
} SFPreset;
/* NOTE: sffd is also used to determine if sound font is new (NULL) */
typedef struct _SFData
@ -130,7 +120,8 @@ typedef struct _SFData
unsigned int samplepos; /* position within sffd of the sample chunk */
unsigned int samplesize; /* length within sffd of the sample chunk */
unsigned int sample24pos; /* position within sffd of the sm24 chunk, set to zero if no 24 bit sample support */
unsigned int sample24pos; /* position within sffd of the sm24 chunk, set to zero if no 24 bit
sample support */
unsigned int sample24size; /* length within sffd of the sm24 chunk */
char *fname; /* file name */
@ -139,14 +130,11 @@ typedef struct _SFData
fluid_list_t *preset; /* linked list of preset info */
fluid_list_t *inst; /* linked list of instrument info */
fluid_list_t *sample; /* linked list of sample info */
}
SFData;
} SFData;
/* functions */
/*-----------------------------------sffile.h----------------------------*/
/*
File structures and routines (used to be in sffile.h)
@ -157,8 +145,7 @@ typedef struct _SFChunk
{ /* RIFF file chunk structure */
unsigned int id; /* chunk id */
unsigned int size; /* size of the following chunk */
}
SFChunk;
} SFChunk;
typedef struct _SFPhdr
{
@ -169,22 +156,19 @@ typedef struct _SFPhdr
unsigned int library; /* just for preserving them */
unsigned int genre; /* Not used */
unsigned int morphology; /* Not used */
}
SFPhdr;
} SFPhdr;
typedef struct _SFBag
{
unsigned short genndx; /* index into generator list */
unsigned short modndx; /* index into modulator list */
}
SFBag;
} SFBag;
typedef struct _SFIhdr
{
char name[20]; /* Name of instrument */
unsigned short ibagndx; /* Instrument bag index */
}
SFIhdr;
} SFIhdr;
typedef struct _SFShdr
{ /* Sample header loading struct */
@ -198,11 +182,10 @@ typedef struct _SFShdr
signed char pitchadj; /* pitch correction in cents */
unsigned short samplelink; /* Not used */
unsigned short sampletype; /* 1 mono,2 right,4 left,linked 8,0x8000=ROM */
}
SFShdr;
} SFShdr;
/* Public functions */
SFData *sfload_file (const char * fname, const fluid_file_callbacks_t* fcbs);
void sfont_close (SFData * sf, const fluid_file_callbacks_t* fcbs);
SFData *sfload_file(const char *fname, const fluid_file_callbacks_t *fcbs);
void sfont_close(SFData *sf, const fluid_file_callbacks_t *fcbs);
#endif /* _FLUID_SF2_H */