When xmp is _running_ in the background, and then is brought to the
foreground, the program will not necessarily be notified of this state
change from external sources, as shells generally do not seem to send
gratitious SIGCONTs.
Therefore, to get keyboard input and status updates working again once
xmp is in the foreground, xmp actively needs to monitor the pgrps
itself, which this patch implements. (rsync does it the same way.)
The "foreground" variable had a double meaning (namely, whether stdin
is a tty). The state of stdin however is irrelevant for output, so we
also need to see if output is a tty. Since the status update goes to
stderr, we have to test STDERR_FILENO.
XMP misdetects who is in foreground. The parent may be an arbitrary
process within the process group and thus does not make sense to
compare to. To demonstrate the issue:
$ perl -e 'system "perl -e \"system \\\"xmp Dreamer.it\\\"\""'
XMP will not print the time status, even though there is no background
involved here. The process structure is:
$ ps f -o pid,pgrp,pgid,tpgid,command
PID PGRP TPGID COMMAND
16095 16095 19847 bash
19847 19847 19847 \_ perl -e system "perl -e \"system \\\"xmp Dreamer.it\\\"\""
19848 19847 19847 \_ perl -e system "xmp Dreamer.it"
19849 19847 19847 \_ xmp Dreamer.it
As pointed out by Jan Engelhardt, many files are missing a license notice.
Add the standard license notice to these files.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Add the --norc option to bypass configuration files. When parsing lines
in the configuration file, disable paramter matching if we're not in the
section that match the current file's MD5 sum.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Certain modules need specific adjustments to play correctly. It's not
possible to automatically detect these modules, so a module-specific
configuration file was added. Adjustments include: workaround for
module conversion errors, differences between protracker versions,
and custom replay parameters for specific modules.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Use the --vblank command-line option to force vblank-based timing instead
of CIA tempo setting. Needed by some modules such as Klisje paa klisje.
Needs new timing API.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Configuration file support was removed during the library conversion.
Re-add it in the player front-end, but remove module-specific config
file for now.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Make naming consistent for API calls, so:
xmp_player_start -> xmp_start_player
xmp_player_end -> xmp_end_player
xmp_player_get_info -> xmp_get_frame_info
xmp_mixer_set -> xmp_set_mixer
xmp_mixer_get -> xmp_get_mixer
Also renamed:
xmp_module_info -> xmp_frame_info
because its information is mostly about frame-specific data.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
The previous stable release of the player (xmp 3.5.0) had option -r
to reverse stereo channels. This option was temporarily removed during
libification to simplify the code base.
Reverse channels option was reimplemented by simply accepting negative
mixing parameters.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Port the configuration file reader from xmp 3.5 to 4.0. Module-specific
configuration still not ported.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Default interpolation algorithm set to cubic spline. Also remove direct
option --nearest/-n to set nearest neighbor interpolation.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Follow Mirko Buffoni's advice to add extra mixers with better interpolation
algorithms. Start adding cubic spline based on Storlek's implementation, still
need to fix sample allocation values to prevent violations when reading
the -1 PCM data.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
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>
- change XMP_FORMAT_* to XMP_MIX_* because they're actually mixer parameters
and not only sample format flags
- briefly document the essential parts of the API in README
- update the player application to use the new API
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
- remove interface for funk-it and fx9 bug emulation quirks. These are rare
and the interface definition wasn't good. Re-add later if needed.
- Set version number to 3.9.0. Release to a limited audience and fix problems
for public 4.0.0
- Cosmetic fixes
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
- automatically select file or wav if -o is selected
- generalized selection of null driver (can use either -dnull or -n)
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>