Re: [linux-audio-dev] pbd's votes on LADSPA

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] pbd's votes on LADSPA
From: James McCartney (asynth_AT_io.com)
Date: Mon Mar 27 2000 - 07:22:27 EEST


on 3/26/00 10:18 PM, James McCartney at asynth_AT_io.com wrote:

> void testbits()
> {
> long startval = 0xFF800000;
> long endval = 0x007FFFFF;
> float convertTo = 1./(1L<<24);
> float convertFrom = (1L<<24);
> for (long i=startval; i<=endval; ++i) {
> float in = i;
> float cin = in * convertTo;
> if (!(-1.0 <= cin && cin < 1.0)) {
> printf("%08X failed range %g\n", i, cin);
> break;
> }
> long out = cin * convertFrom;
> if (out != i) {
> printf("%08X failed bits-in == bits-out %08X\n", i, out);
> break;
> }
> }
> printf("passed\n");
> }

Well the breaks should be returns instead.. but it passes anyway..

--- james mccartney james_AT_audiosynth.com <http://www.audiosynth.com>
SuperCollider - a real time synthesis programming language for the PowerMac.
<ftp://www.audiosynth.com/pub/updates/SC2.2.7.sea.hqx>


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Mar 27 2000 - 07:50:57 EEST