Chris Robinson
90c005bbec
Convert float samples to integer using a power-of-2 multiple
2017-03-31 09:11:28 -07:00
Chris Robinson
355a8898cf
Remove the (u)byte3 sample formats
...
They're not accessible since the removal of the buffer_samples extension, and
were kind of clunky to work with as 24-bit packed values.
2017-03-31 08:15:20 -07:00
Chris Robinson
ac8b4aa5f6
Convert integer samples to float using a power-of-2 divisor
...
This should cut down on unnecessary quantization noise (however minor) for 8-
and 16-bit samples. Unfortunately a power-of-2 multiple can't be used as easily
for converting float samples to integer, due to integer types having a non-
power-of-2 maximum amplitude (it'd require more per-sample clamping).
2017-03-31 06:54:46 -07:00
Chris Robinson
7a140b6912
Reorganize sample type conversion functions
...
To help avoid redundant manual definitions.
2016-08-31 08:30:52 -07:00
Chris Robinson
f313ce2a96
Add some asserts to verify block alignment for conversion
2014-05-20 09:16:54 -07:00
Chris Robinson
c6821e5dd1
Use C11's static_assert when available
2014-04-07 11:48:28 -07:00
Chris Robinson
045959e9c0
Use C99 VLA instead of alloca when available
2014-03-25 18:16:03 -07:00
Chris Robinson
cde2f825d5
Use the correct array size
2014-03-08 22:48:36 -08:00
Chris Robinson
14a04020ff
Improve int-to-float and uint-to-float conversions
2014-03-08 22:34:07 -08:00
Chris Robinson
7657fbb296
Only sign-expand the nibble when needed
2014-03-06 19:14:19 -08:00
Chris Robinson
143f786d1a
Move the sample conversion routines to a separate file
2014-03-05 16:38:02 -08:00