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.
Autoconf checks for native libraries (when using PKG_CHECK_MODULES) when
cross-compiling, and it shouldn't. Follow the suggestion in
http://stackoverflow.com/questions/12624600 and double-check with
AC_CHECK_LIB. I hate pkg-config.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
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>
Mostly in a standards-compliant way this time, complain if set as "no".
This is being re-added by user request.
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>