[ecasound] int to float or float to int conversion

From: Matt Barber <brbrofsvl@email-addr-hidden>
Date: Sun Dec 06 2009 - 09:24:32 EET


How does ecasound convert 16-bit ints to floats? It does not seem to
be a simple divide by 38768, since a file with a range of -32768 to
+32767 seems to map perfectly to -1.0 to +1.0 after conversion. This
is not the case when libsndfile is invoked to open the file -- there
it looks like a division by 38768, leading to a range -1.0 to

I'm also curious about the opposite conversion from float to int.

I assume that the conversion methods are the same for 24-bit integers,
but with different multipliers/divisors etc.



Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
Ecasound-list mailing list
Received on Sun Dec 6 12:15:01 2009

This archive was generated by hypermail 2.1.8 : Sun Dec 06 2009 - 12:15:01 EET