From aae17a1f104b3e0e37f5d372cf8ba65967139c6a Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 12 Jan 2017 11:03:02 +0300 Subject: [PATCH] struct options, struct control: rename 'amiga' member to 'amiga_mixer' because, 'amiga' may be defined as a macro by the compiler (e.g. OS4.) --- src/commands.c | 6 +++--- src/common.h | 4 ++-- src/info.c | 2 +- src/main.c | 4 ++-- src/options.c | 2 +- src/read_config.c | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/commands.c b/src/commands.c index 889aeef..e21c8d5 100644 --- a/src/commands.c +++ b/src/commands.c @@ -191,11 +191,11 @@ void read_command(xmp_context handle, struct xmp_module_info *mi, struct control case 'a': { int f; - ctl->amiga = !ctl->amiga; + ctl->amiga_mixer = !ctl->amiga_mixer; /* set player flags */ f = xmp_get_player(handle, XMP_PLAYER_FLAGS); - if (ctl->amiga) { + if (ctl->amiga_mixer) { xmp_set_player(handle, XMP_PLAYER_FLAGS, f | XMP_FLAGS_A500); } else { @@ -205,7 +205,7 @@ void read_command(xmp_context handle, struct xmp_module_info *mi, struct control /* set current module flags */ f = xmp_get_player(handle, XMP_PLAYER_CFLAGS); - if (ctl->amiga) { + if (ctl->amiga_mixer) { xmp_set_player(handle, XMP_PLAYER_CFLAGS, f | XMP_FLAGS_A500); } else { diff --git a/src/common.h b/src/common.h index 247bf77..7e82012 100644 --- a/src/common.h +++ b/src/common.h @@ -52,7 +52,7 @@ struct options { int explore; /* play all sequences in module */ int show_comment; /* show module comment text */ int player_mode; /* force tracker emulation */ - int amiga; /* enable amiga mixer */ + int amiga_mixer; /* enable amiga mixer */ char *driver_id; /* sound driver ID */ char *out_file; /* output file name */ char *ins_path; /* instrument path */ @@ -69,7 +69,7 @@ struct control { int sequence; /* Current sequence */ int explore; /* Play all sequences */ int cur_info; /* Display current sequence or mixer type */ - int amiga; /* Toggle amiga mixer mode */ + int amiga_mixer; /* Toggle amiga mixer mode */ int mixer_type; /* Mixer type (from player) */ }; diff --git a/src/info.c b/src/info.c index 8c0e53e..41560bc 100644 --- a/src/info.c +++ b/src/info.c @@ -159,7 +159,7 @@ void info_frame(struct xmp_module_info *mi, struct xmp_frame_info *fi, struct co /* Show mixer type */ x = ' '; - if (ctl->amiga) { + if (ctl->amiga_mixer) { switch (ctl->mixer_type) { case XMP_MIXER_STANDARD: x = '-'; diff --git a/src/main.c b/src/main.c index 7ce9cd0..5bc008c 100644 --- a/src/main.c +++ b/src/main.c @@ -368,7 +368,7 @@ int main(int argc, char **argv) control.loop = opt.loop; control.explore = opt.explore; - control.amiga = opt.amiga; + control.amiga_mixer = opt.amiga_mixer; first = optind; play_all: @@ -483,7 +483,7 @@ int main(int argc, char **argv) set_flag(flags, opt.vblank, XMP_FLAGS_VBLANK); set_flag(flags, opt.fx9bug, XMP_FLAGS_FX9BUG); set_flag(flags, opt.fixloop, XMP_FLAGS_FIXLOOP); - set_flag(flags, control.amiga, XMP_FLAGS_A500); + set_flag(flags, control.amiga_mixer, XMP_FLAGS_A500); xmp_set_player(xc, XMP_PLAYER_CFLAGS, flags); /* Show module data */ diff --git a/src/options.c b/src/options.c index 7d9dc10..16bf57a 100644 --- a/src/options.c +++ b/src/options.c @@ -186,7 +186,7 @@ void get_options(int argc, char **argv, struct options *options) while ((o = getopt_long(argc, argv, OPTIONS, lopt, &optidx)) != -1) { switch (o) { case 'A': - options->amiga = 1; + options->amiga_mixer = 1; break; case 'a': options->amplify = atoi(optarg); diff --git a/src/read_config.c b/src/read_config.c index ff657db..1c0d2ee 100644 --- a/src/read_config.c +++ b/src/read_config.c @@ -123,7 +123,7 @@ int read_config(struct options *o) getval_no("srate", o->rate); /*getval_no("time", o->time); getval_no("verbosity", o->verbosity);*/ - getval_yn("amiga", o->amiga, 1); + getval_yn("amiga", o->amiga_mixer, 1); if (!strcmp(var, "driver")) { strncpy(driver, val, 31); @@ -242,7 +242,7 @@ static void parse_modconf(struct options *o, char *confname, unsigned char *md5) getval_tristate("fixloop", o->fixloop); getval_tristate("fx9bug", o->fx9bug); getval_tristate("vblank", o->vblank); - getval_tristate("amiga", o->amiga); + getval_tristate("amiga", o->amiga_mixer); if (!strcmp(var, "interpolation")) { if (!strcmp(val, "nearest")) {