Jaroslav Kysela wrote: > I've fixed the normalization (hopefully) for int64 and float values. Could > you, guys, verify new code?
In the following test else if (sum.as_xxx < (int64_t)-0x80000000) 0x80000000 is an unsigned integer, and, according to C rules, negating an unsigned integer results in an unsigned integer, in this case 0x80000000. Converting this to 64 bits yields 0x0000000080000000. *Ouch* Replacing both tests with else if (sum.as_xxx < (int64_t)(int32_t)0x80000000) should finally work. And > > > (...) the following code snippet > > > > > > add_int64_att: > > > sum.as_sint64 += (u_int64_t) sample * ttp->as_int; > > > still treats the sample as unsigned. Clemens ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek PC Mods, Computing goodies, cases & more http://thinkgeek.com/sf _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel