Add option to enable classic sound mixers

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
master
Claudio Matsuoka 10 years ago
parent 5e32230227
commit e70918de87
  1. 4
      Changelog
  2. 4
      src/commands.c
  3. 2
      src/common.h
  4. 3
      src/info.c
  5. 2
      src/main.c
  6. 7
      src/options.c
  7. 7
      src/xmp.1

@ -2,7 +2,9 @@ Stable versions
---------------
4.1.0 ():
- Add option to force tracker emulation (requires libxmp 4.4)
- Requires libxmp 4.4
- Add option to force tracker emulation
- Add option to enable classic sound mixers
- Remove option --offset-bug-emulation
4.0.11 (20160306):

@ -185,6 +185,10 @@ void read_command(xmp_context handle, struct xmp_module_info *mi, struct control
ctl->loop++;
ctl->loop %= 3;
break;
case 'x':
ctl->classic = !ctl->classic;
xmp_set_player(handle, XMP_FLAGS_CLASSIC, ctl->classic);
break;
case 'Z':
ctl->cur_seq = 1;
break;

@ -51,6 +51,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 */
char *driver_id; /* sound driver ID */
char *out_file; /* output file name */
char *ins_path; /* instrument path */
@ -67,6 +68,7 @@ struct control {
int sequence; /* Current sequence */
int explore; /* Play all sequences */
int cur_seq; /* Display current sequence */
int classic; /* Toggle classic mode */
};
extern struct player_mode pmode[];

@ -29,6 +29,7 @@ void info_help(void)
" ! Unmute all channels\n"
" Z Display current sequence\n"
" z Toggle subsong explorer mode\n"
" x Toggle classic mixers\n"
" l Toggle loop mode\n"
" m Display module information\n"
" i Display combined instrument/sample list\n"
@ -186,7 +187,7 @@ void info_frame(struct xmp_module_info *mi, struct xmp_frame_info *fi, struct co
"%2.2s/%2.2s] Chn[%02X/%02X] %c%c%c",
rowstr, numrowstr, fi->virt_used, max_channels,
ctl->explore ? 'Z' : ' ', ctl->loop ? 'L' : ' ',
ctl->loop > 1 ? '*' : ' ');
ctl->classic ? 'X' : ' ');
print_time:

@ -331,6 +331,7 @@ int main(int argc, char **argv)
control.loop = opt.loop;
control.explore = opt.explore;
control.classic = opt.classic;
first = optind;
play_all:
@ -442,6 +443,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, opt.classic, XMP_FLAGS_CLASSIC);
xmp_set_player(xc, XMP_PLAYER_CFLAGS, flags);
/* Show module data */

@ -114,6 +114,7 @@ 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 mixers if applicable\n"
"\nEnvironment options:\n"
" -I --instrument-path Set pathname to external samples\n"
"\nInformation options:\n"
@ -131,6 +132,7 @@ static void usage(char *s, struct options *options)
static const struct option lopt[] = {
{ "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 },
@ -177,7 +179,7 @@ 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:uVvZz:"
#define OPTIONS "a:b:CcD:d:e:Ff:hI:i:LlM:mNo:P:p:qRrS:s:T:t:uVvxZz:"
while ((o = getopt_long(argc, argv, OPTIONS, lopt, &optidx)) != -1) {
switch (o) {
case 'a':
@ -352,6 +354,9 @@ 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;

@ -39,8 +39,9 @@ xmp - Extended Module Player
[\fB\-\-vblank\fP]
[\fB\-V, \-\-version\fP]
[\fB\-v, \-\-verbose\fP]
[\fB\-x, \-\-classic\fP]
[\fB\-Z, \-\-all\-sequences\fP]
[\fB\-z, \-\-sequence\fP]
[\fB\-z, \-\-sequence\fP \fInum\fP]
\fImodules\fP
.PP
.SH "DESCRIPTION"
@ -143,6 +144,10 @@ Print version information\&.
Verbose mode (incremental)\&. If specified more than once, the
verbosity level will be increased (no messages will be displayed
when the player runs in background)\&.
.IP "\fB\-x, \-\-classic\fP"
Use classic sound mixers\&, if available for the format being played\&.
For Amiga formats such as Protracker, classic mode simulates the sound
of an Amiga 500\&, with or without the led filter\&.
.IP "\fB\-Z, \-\-all\-sequences\fP"
Play all hidden or alternative pattern sequences (subsongs) in module\&.
.IP "\fB\-z, \-\-sequence\fP \fInum\fP"

Loading…
Cancel
Save