From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200204051430.g35EUtf12512@copernicus.cs.utwente.nl> To: 9fans@cse.psu.edu Subject: Re: [9fans] sb16(?) problem: audio timeout / mpg123: problem: division-by-zero In-reply-to: Your message of "Thu, 04 Apr 2002 13:19:17 -0500." References: From: Axel Belinfante Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 5 Apr 2002 16:30:55 +0200 Topicbox-Message-UUID: 72f96da8-eaca-11e9-9e20-41e7f4b1d025 Thanks to those who reacted; I solved the problems. I got the sb working by simply trying more irq/dma configurations in plan9.ini (in my case: irq=5 dma=1 works). W.r.t. mpg123 it looks like my hack-around works. For the archives: version: mpg123-0.59r problem: division-by-zero hack-around: --- layer3.c Wed Apr 21 17:25:18 1999 +++ /tmp/layer3.c Fri Apr 5 16:23:52 2002 @@ -169,10 +169,14 @@ for(i=0;i<16;i++) { double t = tan( (double) i * M_PI / 12.0 ); - tan1_1[i] = t / (1.0+t); - tan2_1[i] = 1.0 / (1.0 + t); - tan1_2[i] = M_SQRT2 * t / (1.0+t); - tan2_2[i] = M_SQRT2 / (1.0 + t); + double tt = (1.0+t); + if (tt == 0.0) + tt = 0.00001; + /* fprintf(stderr, "tt=%f\n", tt); */ + tan1_1[i] = t / tt; + tan2_1[i] = 1.0 / tt; + tan1_2[i] = M_SQRT2 * t / tt; + tan2_2[i] = M_SQRT2 / tt; for(j=0;j<2;j++) { double base = pow(2.0,-0.25*(j+1.0)); Regards, Axel.