Chris Robinson
def2547e40
Fix some 'may be used initialized' warnings
2018-01-23 16:03:06 -08:00
Chris Robinson
5f3ae527c9
More cleanup for buffer loading
...
Don't bother with unnecessary and unused converters, and remove some
unsupported queries.
2018-01-21 23:35:28 -08:00
Chris Robinson
efd11f32a2
Remove support for (signed) byte and ushort sample storage
...
Also not used without buffer_samples
2018-01-21 18:16:27 -08:00
Chris Robinson
6489fb586b
Remove (u)int32 sample storage conversion
...
Unused without the buffer_samples extension
2018-01-21 17:55:35 -08:00
Chris Robinson
884fe40fd1
Store mulaw and alaw samples directly in the buffer
...
They're now decompressed on the fly in the mixer. This is not a significant
performance issue given that it only needs a 512-byte lookup table, and the
buffer stores half as much data (it may actually be faster, requiring less
overall memory).
2018-01-17 08:49:49 -08:00
Chris Robinson
bf8c889631
Define DECL_VLA where it's used
2018-01-16 12:57:06 -08:00
Chris Robinson
bc44efb91d
Use ALsizei for some count/length variables
2018-01-15 18:31:43 -08:00
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