Fix module specific configuration file

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
master
Claudio Matsuoka 10 years ago
parent d2ab411f80
commit 58e2311122
  1. 1
      Changelog
  2. 3
      src/modules.conf
  3. 14
      src/read_config.c
  4. 4
      src/xmp.1
  5. 10
      src/xmp.conf

@ -6,6 +6,7 @@ Stable versions
- Add option to force tracker emulation
- Add option to enable classic sound mixers
- Fix default amplification factor
- Fix module-specific configuration file options
- Remove option --offset-bug-emulation
4.0.11 (20160306):

@ -5,11 +5,12 @@
# Format is:
#
# [MD5sum]
# 8bit = yes/no Convert 16 bit samples to 8 bit
# amplify = <0|1|2|3> Amplification factor (default is 1)
# classic = yes/no Enable classic 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
# loop = yes/no Loop module
# mode = <player mode> Force tracker emulation
# mono = yes/no Mono output
# mix = value Stereo channel separation (0 - 100)

@ -121,6 +121,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);
if (!strcmp(var, "driver")) {
strncpy(driver, val, 31);
@ -192,6 +193,7 @@ static void parse_modconf(struct options *o, char *confname, unsigned char *md5)
char *hash, *var, *val, line[256];
struct player_mode *pm;
int active = 0;
int mono = 0;
if ((rc = fopen(confname, "r")) == NULL)
return;
@ -227,10 +229,9 @@ static void parse_modconf(struct options *o, char *confname, unsigned char *md5)
val = strtok(NULL, " \t\n");
getval_yn("8bit", o->format, XMP_FORMAT_8BIT);
getval_yn("mono", o->format, XMP_FORMAT_MONO);
getval_yn("filter", o->dsp, XMP_DSP_LOWPASS);
getval_yn("loop", o->loop, XMP_DSP_LOWPASS);
getval_yn("loop", o->loop, 1);
getval_yn("mono", mono, 1);
getval_yn("reverse", o->reverse, 1);
getval_no("amplify", o->amplify);
getval_no("mix", o->mix);
@ -238,6 +239,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);
if (!strcmp(var, "interpolation")) {
if (!strcmp(val, "nearest")) {
@ -262,6 +264,12 @@ static void parse_modconf(struct options *o, char *confname, unsigned char *md5)
"\"%s\"\n", confname, val);
}
}
fprintf(stderr, "%s: unknown option \"%s\"\n", confname, var);
}
if (mono) {
o->mix = 0;
}
fclose(rc);

@ -146,8 +146,8 @@ 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\&.
For Amiga formats such as Protracker, the classic mode mixer models 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"

@ -72,6 +72,13 @@
#
#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.
#
#classic = no
# srate = <val>
# Sampling rate in hertz. Default is 44100 Hz.
#
@ -135,6 +142,7 @@
#mix = 70
# default_pan = <val>
# Default pan setting for 4-channel Amiga modules. Default is 50%
# Default pan setting for modules with L/R channels. Default is 50%
# (does not affect the Amiga classic mixer)
#
#default_pan = 50

Loading…
Cancel
Save