struct options, struct control: rename 'amiga' member to 'amiga_mixer'

because, 'amiga' may be defined as a macro by the compiler (e.g. OS4.)
master
sezero 9 years ago committed by Claudio Matsuoka
parent b6f93421fe
commit aae17a1f10
  1. 6
      src/commands.c
  2. 4
      src/common.h
  3. 2
      src/info.c
  4. 4
      src/main.c
  5. 2
      src/options.c
  6. 4
      src/read_config.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 {

@ -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) */
};

@ -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 = '-';

@ -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 */

@ -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);

@ -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")) {

Loading…
Cancel
Save