Change command line parameter name from classic to amiga

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
master
Claudio Matsuoka 10 years ago
parent ae40fda525
commit 848fc4db00
  1. 16
      src/commands.c
  2. 4
      src/common.h
  3. 6
      src/info.c
  4. 4
      src/main.c
  5. 2
      src/modules.conf
  6. 12
      src/options.c
  7. 4
      src/read_config.c
  8. 9
      src/xmp.conf

@ -188,29 +188,29 @@ void read_command(xmp_context handle, struct xmp_module_info *mi, struct control
case 'X':
ctl->cur_info = 'X';
break;
case 'x': {
case 'a': {
int f;
ctl->classic = !ctl->classic;
ctl->amiga = !ctl->amiga;
/* set player flags */
f = xmp_get_player(handle, XMP_PLAYER_FLAGS);
if (ctl->classic) {
if (ctl->amiga) {
xmp_set_player(handle, XMP_PLAYER_FLAGS,
f | XMP_FLAGS_CLASSIC);
f | XMP_FLAGS_A500);
} else {
xmp_set_player(handle, XMP_PLAYER_FLAGS,
f &= ~XMP_FLAGS_CLASSIC);
f &= ~XMP_FLAGS_A500);
}
/* set current module flags */
f = xmp_get_player(handle, XMP_PLAYER_CFLAGS);
if (ctl->classic) {
if (ctl->amiga) {
xmp_set_player(handle, XMP_PLAYER_CFLAGS,
f | XMP_FLAGS_CLASSIC);
f | XMP_FLAGS_A500);
} else {
xmp_set_player(handle, XMP_PLAYER_CFLAGS,
f &= ~XMP_FLAGS_CLASSIC);
f &= ~XMP_FLAGS_A500);
}
break; }
case 'Z':

@ -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 classic; /* enable classic mixers */
int amiga; /* 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 classic; /* Toggle classic mode */
int amiga; /* Toggle amiga mixer mode */
int mixer_type; /* Mixer type (from player) */
};

@ -28,7 +28,7 @@ void info_help(void)
" 1 - 0 Mute/unmute channels\n"
" ! Unmute all channels\n"
" X Display current mixer type\n"
" x Enable classic mixers\n"
" a Enable amiga mixer\n"
" Z Display current sequence\n"
" z Toggle subsong explorer mode\n"
" l Toggle loop mode\n"
@ -159,10 +159,10 @@ void info_frame(struct xmp_module_info *mi, struct xmp_frame_info *fi, struct co
/* Show mixer type */
x = ' ';
if (ctl->classic) {
if (ctl->amiga) {
switch (ctl->mixer_type) {
case XMP_MIXER_STANDARD:
x = 's';
x = '-';
break;
case XMP_MIXER_A500:
x = 'A';

@ -368,7 +368,7 @@ int main(int argc, char **argv)
control.loop = opt.loop;
control.explore = opt.explore;
control.classic = opt.classic;
control.amiga = opt.amiga;
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.classic, XMP_FLAGS_CLASSIC);
set_flag(flags, control.amiga, XMP_FLAGS_A500);
xmp_set_player(xc, XMP_PLAYER_CFLAGS, flags);
/* Show module data */

@ -6,7 +6,7 @@
#
# [MD5sum]
# amplify = <0|1|2|3> Amplification factor (default is 1)
# classic = yes/no Enable classic mixer if available
# amiga = yes/no Enable Amiga simulation mixer if available
# filter = yes/no Enable filters (affects IT only)
# fixloop = yes/no Use sample loop start value / 2
# interpolation = <method> Software mixer interpolation

@ -101,6 +101,7 @@ static void usage(char *s, struct options *options)
" -Z --all-sequences Play all sequences (subsongs) in module\n"
" -z --sequence num Play the specified sequence (0=main)\n"
"\nMixer options:\n"
" -A --amiga Use Paula simulation mixer in Amiga formats\n"
" -a --amplify {0|1|2|3} Amplification factor: 0=Normal, 1=x2, 2=x4, 3=x8\n"
" -b --bits {8|16} Software mixer resolution (8 or 16 bits)\n"
" -c --stdout Mix the module to stdout\n"
@ -116,7 +117,6 @@ static void usage(char *s, struct options *options)
" -p --default-pan Percentual default pan setting (default %d%%)\n"
" -r --reverse Reverse left/right stereo channels\n"
" -u --unsigned Set the mixer to use unsigned samples\n"
" -x --classic Use classic mixer (if available for format)\n"
"\nEnvironment options:\n"
" -I --instrument-path Set pathname to external samples\n"
"\nInformation options:\n"
@ -132,9 +132,9 @@ static void usage(char *s, struct options *options)
}
static const struct option lopt[] = {
{ "amiga", 0, 0, 'A' },
{ "amplify", 1, 0, 'a' },
{ "bits", 1, 0, 'b' },
{ "classic", 0, 0, 'x' },
{ "driver", 1, 0, 'd' },
{ "default-pan", 1, 0, 'p' },
{ "fix-sample-loops", 0, 0, OPT_FIXLOOP },
@ -182,9 +182,12 @@ void get_options(int argc, char **argv, struct options *options)
int optidx = 0;
int o;
#define OPTIONS "a:b:CcD:d:e:Ff:hI:i:LlM:mNo:P:p:qRrS:s:T:t:uVvxZz:"
#define OPTIONS "Aa:b:CcD:d:e:Ff:hI:i:LlM:mNo:P:p:qRrS:s:T:t:uVvZz:"
while ((o = getopt_long(argc, argv, OPTIONS, lopt, &optidx)) != -1) {
switch (o) {
case 'A':
options->amiga = 1;
break;
case 'a':
options->amplify = atoi(optarg);
break;
@ -360,9 +363,6 @@ void get_options(int argc, char **argv, struct options *options)
case 'v':
options->verbose++;
break;
case 'x':
options->classic = 1;
break;
case 'Z':
options->explore = 1;
break;

@ -122,7 +122,7 @@ int read_config(struct options *o)
getval_no("srate", o->rate);
/*getval_no("time", o->time);
getval_no("verbosity", o->verbosity);*/
getval_yn("classic", o->classic, 1);
getval_yn("amiga", o->amiga, 1);
if (!strcmp(var, "driver")) {
strncpy(driver, val, 31);
@ -241,7 +241,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("classic", o->classic);
getval_tristate("amiga", o->amiga);
if (!strcmp(var, "interpolation")) {
if (!strcmp(val, "nearest")) {

@ -72,12 +72,11 @@
#
#amplify = 1
# classic = <yesno>
# Enable classic mixer if available. For Amiga 4-channel modules, the
# classic mixer is modeled after an Amiga 500 with led filter option.
# Default is disabled.
# amiga = <yesno>
# Enable Amiga simulation mixer for Amiga 4-channel modules. The mixer is
# modeled after an Amiga 500 with led filter option. Default is disabled.
#
#classic = no
#amiga = no
# srate = <val>
# Sampling rate in hertz. Default is 44100 Hz.

Loading…
Cancel
Save