head 1.5; access; symbols pkgsrc-2014Q1:1.4.0.20 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.18 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.16 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.4.0.14 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.12 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.10 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.8 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.6 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.4 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.2 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.3.0.2 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.2.0.60 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.58 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.56 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.54 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.2.0.52 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.50 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.48 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.46 pkgsrc-2008Q2-base:1.2 cwrapper:1.2.0.44 pkgsrc-2008Q1:1.2.0.42 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.40 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.38 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.36 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.34 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.32 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.30 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.28 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.26 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.24 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.22 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.20 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.18 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.16 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.14 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.12 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.10 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.8 pkgsrc-2003Q4-base:1.2 netbsd-1-6-1:1.2.0.4 netbsd-1-6-1-base:1.2 netbsd-1-6:1.2.0.6 netbsd-1-6-RELEASE-base:1.2 pkgviews:1.2.0.2 pkgviews-base:1.2 buildlink2:1.1.0.2 buildlink2-base:1.1 netbsd-1-5-PATCH003:1.1 netbsd-1-5-PATCH001:1.1 netbsd-1-5-RELEASE:1.1 netbsd-1-4-PATCH003:1.1 netbsd-1-4-PATCH002:1.1 comdex-fall-1999:1.1; locks; strict; comment @# @; 1.5 date 2014.05.20.19.59.09; author adam; state dead; branches; next 1.4; commitid 2muyseoaSr6pAjBx; 1.4 date 2011.10.17.21.43.27; author shattered; state Exp; branches; next 1.3; 1.3 date 2010.03.14.14.19.19; author martin; state dead; branches; next 1.2; 1.2 date 2002.06.23.08.45.09; author kent; state Exp; branches; next 1.1; 1.1 date 99.10.12.04.43.15; author simonb; state Exp; branches; next ; desc @@ 1.5 log @Changes 1.19.0: - Support float and 32/24 bit integer output also with fixed-point decoders (conversion from 16 bit precision). - A-Law output encoding is actually implemented now (Michael introduced the encoding back in the old days without ever implementing theconversion table, apparently). - Added --with-cpu=arm_fpu as decoder choice for runtime switch between plain fpu code and NEON. - Fix ARM builds to work properly on debian systems without special CFLAGS (NEON decoder, specifically). - Make scripts/benchmark-cpu.pl check the return value instead of delivering crazy timings for crashed mpg123. - Trigger track initialization in mpg123_info() to avoid use of uninitialized variables (watch out for MPG123_NEED_MORE return value!). - Fix integer code to 32 bit numbers where it would waste 64 bit on modern systems. - Add non-executable stack marking also to ARM assembly. @ text @$NetBSD: patch-aj,v 1.4 2011/10/17 21:43:27 shattered Exp $ getaddrinfo(3) returns non-zero on error. --- src/resolver.c.orig 2010-10-04 06:23:26.000000000 +0000 +++ src/resolver.c @@@@ -283,7 +283,7 @@@@ int open_connection(mpg123_string *host, #endif addrcount = getaddrinfo(host->p, port->p, &hints, &addrlist); - if(addrcount <0) + if(addrcount != 0) { error3("Resolving %s:%s: %s", host->p, port->p, gai_strerror(addrcount)); return -1; @ 1.4 log @PR/44543 -- recognize any non-zero return value getaddrinfo() as error. Bump revisions of all variant packages. (wearing pointy hat) @ text @d1 1 a1 1 $NetBSD$ @ 1.3 log @Update mpg123 to version 1.10.1. Thanks to for answering lots of stupid questions and general guidance. @ text @d1 1 a1 1 $NetBSD: patch-aj,v 1.2 2002/06/23 08:45:09 kent Exp $ d3 5 a7 115 --- mpg123.h.orig Fri May 28 23:51:58 1999 +++ mpg123.h @@@@ -56,8 +56,115 @@@@ # define real float #elif defined(REAL_IS_LONG_DOUBLE) # define real long double +#elif defined(REAL_IS_FIXED) +# define real long + +# define REAL_RADIX 15 +# define REAL_FACTOR (32.0 * 1024.0) + +# define REAL_PLUS_32767 ( 32767 << REAL_RADIX ) +# define REAL_MINUS_32768 ( -32768 << REAL_RADIX ) + +# define DOUBLE_TO_REAL(x) ((int)((x) * REAL_FACTOR)) +# define REAL_TO_SHORT(x) ((x) >> REAL_RADIX) +# define REAL_MUL(x, y) (((long long)(x) * (long long)(y)) >> REAL_RADIX) + +#elif defined(REAL_IS_FIXED_ARMV4) +# define REAL_IS_FIXED +# define real long long + +# define REAL_RADIX 32 +# define REAL_FACTOR (4294967296.0) + +# define REAL_PLUS_32767 ( 32767LL << REAL_RADIX ) +# define REAL_MINUS_32768 ( -32768LL << REAL_RADIX ) + +# define DOUBLE_TO_REAL(x) ((long long)((x) * REAL_FACTOR)) +# define REAL_TO_SHORT(x) ((x) >> REAL_RADIX) + +/* + * "Reals" are signed, 15 bits before the point, 32 bits after. + * Multiplication is done like so: + * + * if |x| < 2^8, shift x >> 7, else shift x >>15 + * if |y| < 2^8, shift y >> 7, else shift y >>15 + * multiply x * y (just avoids clipping MSB) + * shift the result >> 2, 10 or 18 bits, to make a total shift of 32 bits + * + * I'd do it in C, but gcc optimises it rather poorly (2K stack + * frames, anyone?). Hence the bit of (ARMv4) asm magic below. + * (Unfortunately, the CLZ opcode, which would make for a much neater + * solution to this, doesn't appear until ARMv5) + * + * (tjd April 2002) + */ + +# define REAL_MUL(x, y) real_mul((x),(y)) + +static __inline__ long long real_mul(long long x, long long y) { + const register long long _x asm("r0") = (x); + const register long long _y asm("r2") = (y); + register long long rv asm("r0"); + __asm__ __volatile__ ( +"@@ we'll need to shift the result at least >> 2\n" +" mov r4, #2\n" +"@@ both args >> 7,\n" +" mov r0, r0, lsr #7\n" +" mov r2, r2, lsr #7\n" +" orr r0, r0, r1, lsl #25\n" +" orr r2, r2, r3, lsl #25\n" +" mov r1, r1, asr #7\n" +" mov r3, r3, asr #7\n" +"@@ check if x needs further shiftage\n" +" cmp r1, #0\n" +" cmnne r1, #1\n" +" addeq r4, r4, #8\n" +"@@ shift x if needed\n" +" movne r0, r0, lsr #8\n" +" orrne r0, r0, r1, lsl #24\n" +" movne r1, r1, asr #8\n" +"@@ check if y needs further shiftage\n" +" cmp r3, #0\n" +" cmnne r3, #1\n" +" addeq r4, r4, #8\n" +"@@ shift y if needed\n" +" movne r2, r2, lsr #8\n" +" orrne r2, r2, r3, lsl #24\n" +" movne r3, r3, asr #8\n" +"@@ multiply (ignoring overflow)\n" +" mul r3, r0, r3\n" +" mla r3, r1, r2, r3\n" +" umull r0, r1, r2, r0\n" +" add r1, r1, r3\n" +"@@ shift the result the appropriate amount\n" +" rsb r3, r4, #32\n" +" mov r0, r0, lsr r4\n" +" orr r0, r0, r1, lsl r3\n" +" mov r1, r1, asr r4\n" + : "=r" (rv) + : "0" (_x), "r" (_y) + : "r1", "r3", "r4", "cc"); + return rv; +} + #else # define real double +#endif + +#ifndef DOUBLE_TO_REAL +# define DOUBLE_TO_REAL(x) (x) +#endif +#ifndef REAL_TO_SHORT +# define REAL_TO_SHORT(x) (x) +#endif +#ifndef REAL_PLUS_32767 +# define REAL_PLUS_32767 32767.0 +#endif +#ifndef REAL_MINUS_32768 +# define REAL_MINUS_32768 -32768.0 +#endif +#ifndef REAL_MUL +# define REAL_MUL(x, y) ((x) * (y)) d9 1 d11 5 a15 1 #ifdef __GNUC__ @ 1.2 log @Integrate ARM 64bit fixedpoint patch submitted by Tim Deegan in pkg/16479. This feature is enabled by MPG123_ARM_FIXED64. mpg123/Makefile.common contains common stuff of mpg123 and mpg123-esound. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Add fixed-point support used by the arm32. XXX: Uses strongarm C-compiler options to use 32x32=64 int multiply. @ text @d3 3 a5 3 --- mpg123.h.orig Sat May 29 00:51:58 1999 +++ mpg123.h Tue Oct 12 01:17:16 1999 @@@@ -56,8 +56,37 @@@@ d21 78 @