mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-11 21:31:18 +00:00
Rename p in load_pgen to preset_list
This commit is contained in:
parent
9e7c108f4c
commit
8df5abf903
1 changed files with 9 additions and 8 deletions
|
@ -1368,7 +1368,8 @@ static int load_pmod(SFData *sf, int size)
|
||||||
* ------------------------------------------------------------------- */
|
* ------------------------------------------------------------------- */
|
||||||
static int load_pgen(SFData *sf, int size)
|
static int load_pgen(SFData *sf, int size)
|
||||||
{
|
{
|
||||||
fluid_list_t *p, *dup, **hz = NULL;
|
fluid_list_t *dup, **hz = NULL;
|
||||||
|
fluid_list_t *preset_list;
|
||||||
fluid_list_t *zone_list;
|
fluid_list_t *zone_list;
|
||||||
fluid_list_t *gen_list;
|
fluid_list_t *gen_list;
|
||||||
SFZone *z;
|
SFZone *z;
|
||||||
|
@ -1377,14 +1378,14 @@ static int load_pgen(SFData *sf, int size)
|
||||||
unsigned short genid;
|
unsigned short genid;
|
||||||
int level, skip, drop, gzone, discarded;
|
int level, skip, drop, gzone, discarded;
|
||||||
|
|
||||||
p = sf->preset;
|
preset_list = sf->preset;
|
||||||
|
|
||||||
while(p)
|
while(preset_list)
|
||||||
{
|
{
|
||||||
/* traverse through all presets */
|
/* traverse through all presets */
|
||||||
gzone = FALSE;
|
gzone = FALSE;
|
||||||
discarded = FALSE;
|
discarded = FALSE;
|
||||||
zone_list = ((SFPreset *)(p->data))->zone;
|
zone_list = ((SFPreset *)(preset_list->data))->zone;
|
||||||
|
|
||||||
if(zone_list)
|
if(zone_list)
|
||||||
{
|
{
|
||||||
|
@ -1523,7 +1524,7 @@ static int load_pgen(SFData *sf, int size)
|
||||||
{
|
{
|
||||||
void *save = zone_list->data;
|
void *save = zone_list->data;
|
||||||
FLUID_LOG(FLUID_WARN, "Preset '%s': Global zone is not first zone",
|
FLUID_LOG(FLUID_WARN, "Preset '%s': Global zone is not first zone",
|
||||||
((SFPreset *)(p->data))->name);
|
((SFPreset *)(preset_list->data))->name);
|
||||||
SLADVREM(*hz, zone_list);
|
SLADVREM(*hz, zone_list);
|
||||||
*hz = fluid_list_prepend(*hz, save);
|
*hz = fluid_list_prepend(*hz, save);
|
||||||
continue;
|
continue;
|
||||||
|
@ -1533,7 +1534,7 @@ static int load_pgen(SFData *sf, int size)
|
||||||
{
|
{
|
||||||
/* previous global zone exists, discard */
|
/* previous global zone exists, discard */
|
||||||
FLUID_LOG(FLUID_WARN, "Preset '%s': Discarding invalid global zone",
|
FLUID_LOG(FLUID_WARN, "Preset '%s': Discarding invalid global zone",
|
||||||
((SFPreset *)(p->data))->name);
|
((SFPreset *)(preset_list->data))->name);
|
||||||
*hz = fluid_list_remove(*hz, zone_list->data);
|
*hz = fluid_list_remove(*hz, zone_list->data);
|
||||||
delete_zone((SFZone *)fluid_list_get(zone_list));
|
delete_zone((SFZone *)fluid_list_get(zone_list));
|
||||||
}
|
}
|
||||||
|
@ -1561,10 +1562,10 @@ static int load_pgen(SFData *sf, int size)
|
||||||
{
|
{
|
||||||
FLUID_LOG(FLUID_WARN,
|
FLUID_LOG(FLUID_WARN,
|
||||||
"Preset '%s': Some invalid generators were discarded",
|
"Preset '%s': Some invalid generators were discarded",
|
||||||
((SFPreset *)(p->data))->name);
|
((SFPreset *)(preset_list->data))->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
p = fluid_list_next(p);
|
preset_list = fluid_list_next(preset_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* in case there isn't a terminal record */
|
/* in case there isn't a terminal record */
|
||||||
|
|
Loading…
Reference in a new issue