[xmp] Add --fix-sample-loop option

This option passes XMP_FLAGS_FIXLOOP to the library. See README.fixloop
in the library documentation for more details.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
master
Claudio Matsuoka 13 years ago
parent 30f68b150f
commit f3e351dc9d
  1. 8
      src/options.c
  2. 5
      src/xmp.1

@ -32,7 +32,8 @@ enum {
OPT_PROBEONLY,
OPT_LOADONLY,
OPT_NOCMD,
OPT_VBLANK
OPT_VBLANK,
OPT_FIXLOOP,
};
static void usage(char *s)
@ -61,6 +62,7 @@ static void usage(char *s)
printf("\nPlayer control options:\n"
" -D parameter[=val] Pass configuration parameter to the output driver\n"
" -d --driver name Force output to the specified device\n"
" --fix-sample-loops Use sample loop start /2 in MOD/UNIC/NP3\n"
" -l --loop Enable module looping\n"
" -M --mute ch-list Mute the specified channels\n"
" --nocmd Disable interactive commands\n"
@ -99,6 +101,7 @@ static struct option lopt[] = {
{ "amplify", 1, 0, 'a' },
{ "bits", 1, 0, 'b' },
{ "driver", 1, 0, 'd' },
{ "fix-sample-loops", 0, 0, OPT_FIXLOOP },
{ "frequency", 1, 0, 'f' },
{ "help", 0, 0, 'h' },
{ "instrument-path", 1, 0, 'I' },
@ -162,6 +165,9 @@ void get_options(int argc, char **argv, struct options *options)
case 'f':
options->rate = strtoul(optarg, NULL, 0);
break;
case OPT_FIXLOOP:
options->flags |= XMP_FLAGS_FIXLOOP;
break;
case 'I':
options->ins_path = optarg;
break;

@ -12,6 +12,7 @@ xmp - Extended Module Player
[\fB-d, --driver\fP \fIdriver\fP]
[\fB-F, --nofilter\fP]
[\fB-f, --frequency\fP \fIrate\fP]
[\fB--fix-sample-loop\fP]
[\fB-h, --help\fP]
[\fB-I, --instrument-path\fP]
[\fB-i, --interpolation \fItype\fP]
@ -63,6 +64,10 @@ probe each available driver\&.
Disable IT lowpass filter effect and envelopes.
.IP "\fB-f, --frequency\fP \fIrate\fP"
Set the software mixer sampling rate in hertz\&.
.IP "\fB--fix-sample-loop\fP"
Halve sample loop start values\&. Use it to work around bad conversions
from 15-instrument modules and to correctly play NoisePacker v2 and certain
UNIC files.
.IP "\fB-h, --help\fP"
Show a short summary of command-line options\&.
.IP "\fB-I, --instrument-path\fP \fIpath\fP"

Loading…
Cancel
Save