This macro in plugin_ops.h #ifdef __i386__ #define _get_triple_le(ptr) (*(u_int32_t*)(ptr) & 0xffffff) tries to access four bytes through the pointer. If the three bytes of valid data are at the end of a page and the next page isn't mapped, this results in an exception. The companion macro #define _get_triple_be(ptr) (bswap_32(*(u_int32_t*)(ptr)) & 0xffffff) suffers from the same problem, and, additionally, is wrong (it lacks ">> 8" after the bswap). I fixed both macros by removing them. :-)
There is a typo in get16_1230_B2. The put16_labels array is declared as having 128 elements instead of 16. The gets_* code doesn't correctly extend the sign of the value in every case. put_12_A1 should have been put_12_29, and the codes for put_0123_* use the nonexistent macros as_s24/as_u24. (This doesn't really matter as put_* isn't used anyway.) The _norms function appears to be badly broken (_min and _max interchanged, using 32/64 bits for 24/32 bit values). I didn't attempt to fix it as it isn't used, either. And the summing/normalization code in pcm_route.c treats the sample as if it were unsigned. Clemens
lib-pcm.diff
Description: Binary data