Generalize filters as DSP effects

Add DSP flags to mixer and generalize the existing lowpass filter as a
DSP effect. Reverb and chorus effects (used in e.g. IMF) can be added
to the list later.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
master
Claudio Matsuoka 14 years ago
parent f9baeda4fe
commit 1e9cb9bfc0
  1. 1
      src/common.h
  2. 2
      src/main.c
  3. 5
      src/options.c

@ -11,6 +11,7 @@ struct options {
int max_time; /* max. replay time */
int mix; /* channel separation */
int interp; /* interpolation type */
int dsp; /* dsp effects */
int loop; /* loop module */
int random; /* play in random order */
int verbose;

@ -174,6 +174,7 @@ int main(int argc, char **argv)
options.mix = -1;
options.driver_id = NULL;
options.interp = XMP_INTERP_LINEAR;
options.dsp = XMP_DSP_LOWPASS;
get_options(argc, argv, &options);
@ -301,6 +302,7 @@ int main(int argc, char **argv)
if (xmp_player_start(handle, options.rate, options.format) == 0) {
xmp_mixer_set(handle, XMP_MIXER_INTERP, options.interp);
xmp_mixer_set(handle, XMP_MIXER_DSP, options.dsp);
xmp_set_position(handle, options.start);

@ -157,11 +157,8 @@ void get_options(int argc, char **argv, struct options *options)
options->driver_id = optarg;
break;
case 'F':
/* FIXME */
#if 0
options->format |= XMP_FORMAT_NOFILTER;
options->dsp &= ~XMP_DSP_LOWPASS;;
break;
#endif
case 'f':
options->rate = strtoul(optarg, NULL, 0);
break;

Loading…
Cancel
Save