Eugene Toder reports:
When I abort the playback using Ctrl-C I get the following error:
Assertion 'pthread_mutex_destroy(&m->mutex) == 0' failed at
pulsecore/mutex-posix.c:83, function pa_mutex_free(). Aborting.
Aborted (core dumped)
This happens because xmp registers a signal handler for SIGINT that calls
sound->deinit(). For the PulseAudio driver this calls pa_simple_free(),
which is apparently not happy to be called from a signal handler. Commenting
out the call to deinit() fixes the problem, and seems to work well for both
OSS and PulseAudio.
Generally speaking, calling deinit() from a signal handler is dangerous --
it's likely to call free() or similar, which is not signal safe. Is this
necessary? If the idea is to have a graceful shutdown on Ctrl-C, the handler
should set a flag or use longjmp() to exit the play loop in main(). Also,
attempting a graceful shutdown for SIGFPE and especially SIGSEGV is probably
not a good idea.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
1. Add a keyboard shortcut 'h' as an alias for '?'. 'h' is quite common.
2. Advertise it in the banner, so people can discover all the other
shortcuts. Feel free to change the wording.
At present, xmp client tries reading its config from/writing its config
to %SystemRoot% which is c:/windows or something:
http://en.wikipedia.org/wiki/Environment_variables#Microsoft_Windows
... and it is wrong and many times not allowed. A better choice would
be using %USERPROFILE% instead, which is what I did today for mikmod.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Reported by Ozkan Sezer <sezeroz@gmail.com>:
There are also warnings wherever list_entry() macro is used, such as:
src/load.c: In function 'unlink_tempfiles':
src/load.c:404:8: warning: cast from pointer to integer of different size
... or:
options.c: In function 'usage':
options.c:52:8: warning: cast from pointer to integer of different size
options.c:57:8: warning: cast from pointer to integer of different size
... which may be cured by changing (unsigned long) cast with (size_t)
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This patch makes xmp compatible with win64. Here is the relevant warning
from gcc:
sound_win32.c: In function 'init':
sound_win32.c:97:50: warning: cast from pointer to integer of different size
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Command-line options use minus signs, but groff interprets '-' as a
hyphen, which is a different Unicode character. For text which may be
copied to a command-line for re-use, it's preferable to use explicit
minus signs, '\-' in groff. See
http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html for more
details.
- Enabled the appropriate macros so that alsa and pulseaudio drivers
are enabled in src/sound.c.
- Replace DRIVER_QNX and DRIVER_ALSA05 for SOUND_QNX and SOUND_ALSA05
- Change SOUND_PULSE to SOUND_PULSEAUDIO to keep naming consistent
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Add a pragma to disable the empty translation unit in Solaris. Some
source files will be ifdef'ed out and will be empty in certain
platforms.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Change foreground process flags defaults in such a way that frame
information is shown in systems without termios such as Windows.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>