Chris Robinson
a758cc8243
Remove use of DECL_CONST
...
No idea if it was really gaining us anything, but removing it fixes a crash I
was getting with libs built with Clang.
2016-09-06 09:09:25 -07:00
Chris Robinson
2e7ec3979a
Avoid using realloc in a number of places
2016-05-21 03:27:51 -07:00
Chris Robinson
21bc0f5ef8
Hold the buffer map lock while handling the buffer
2016-05-10 23:42:44 -07:00
Chris Robinson
3556da0d02
Start AL_SOFT_buffer_samples2 as a replacement for AL_SOFT_buffer_samples
2016-04-25 18:56:59 -07:00
Chris Robinson
ac51c9cce6
Add preliminary AL_EXT_BFORMAT support
...
Currently missing the AL_ORIENTATION source property. Gain stepping also does
not work.
2014-10-31 17:18:45 -07:00
Chris Robinson
5840f5e76f
Make the buffer's pack and unpack properties atomic
2014-09-03 15:40:15 -07:00
Chris Robinson
22982948cf
Standardize some New/Delete methods
2014-06-30 00:10:40 -07:00
Chris Robinson
8176d2c058
Load soundfont samples into an ALbuffer
...
Also remove ALsoundfont's now-unneeded sample storage functions and struct
fields.
2014-06-29 02:04:05 -07:00
Chris Robinson
5ef5d218c4
Mark a few more functions as const
2014-05-23 10:00:58 -07:00
Chris Robinson
a1c440bd09
Add an extension to support MSADPCM buffer formats
2014-03-04 22:44:30 -08:00
Chris Robinson
f3a87d72b2
Add an extension to alter the block alignment for buffer unpack/pack ops
...
This is for unpacking (reading, e.g. alBufferData) and packing (writing, e.g.
alGetBufferSamplesSOFT) operations. The alignments are specified in sample
frames, with 0 meaning the default (65 for IMA4, 1 otherwise). IMA4 alignment
must be a multiple of 8, plus 1 (e.g. alignment = n*8 + 1), otherwise an error
will occur during (un)packing. Chenging the block alignment does not affect
already-loaded sample data, only future unpack/pack operations... so for
example, this is perfectly valid:
// Load mono IMA4 data with a block alignment of 1024 bytes, or 2041 sample
// frames.
alBufferi(buffer, AL_UNPACK_BLOCK_ALIGNMENT_SOFT, 2041);
alBufferData(buffer, AL_FORMAT_MONO_IMA4, data, data_len, srate);
alBufferi(buffer, AL_UNPACK_BLOCK_ALIGNMENT_SOFT, 0);
2014-03-04 05:53:35 -08:00
Chris Robinson
c442c93a93
Store the original frame size alignment in the buffer
2014-03-03 17:05:08 -08:00
Chris Robinson
5874e387a8
Move some inline methods to their appropriate headers
2013-11-04 13:51:19 -08:00
Chris Robinson
551f893ae9
Use C99 inline semantics
2013-11-04 12:12:31 -08:00
Chris Robinson
8aa237ac23
Fix effect slot struct declarations so KDevelop doesn't barf on them
2013-10-07 05:41:41 -07:00
Chris Robinson
94884ed04b
Use a separate value for the maximum buffer channels
...
Unlike the device, input buffers are accessed based on channel numbers
instead of enums. This means the maximum number of channels they hold
depends on the number of channels any one format can have, rather than
the total number of recognized channels. Currently, this is 8 for 7.1.
2013-07-23 00:13:15 -07:00
Chris Robinson
e96cc656e9
Use C99's inline instead of __inline
2013-05-28 22:27:07 -07:00
Chris Robinson
9f58edd7a8
Fix up some more header includes
2012-09-14 02:42:36 -07:00
Chris Robinson
08bd5e8b37
Fix comment and rename the buffer's self-id
2012-04-19 22:14:02 -07:00
Chris Robinson
29ba8f9f1a
Remove the unnecessary AL_MULAW_SOFT, AL_ALAW_SOFT, and AL_IMA4_SOFT defines
2012-01-10 00:59:10 -08:00
Chris Robinson
61af4d715c
Append _SOFT to the AL_SOFT_buffer_samples enums
2012-01-10 00:41:05 -08:00
Chris Robinson
11caba9807
Use sample frames when handling the buffer length
2011-10-04 02:08:45 -07:00
Chris Robinson
eb0b96752a
Remove the OriginalAlign buffer field, and calculate it as needed
2011-10-01 19:52:07 -07:00
Chris Robinson
8b2e1fdd9a
Add buffer properties to get the internal format, and the length in bytes, samples, and seconds
...
The provided buffer lengths correspond to the source offsets, in that the byte
length specifies the end of the byte offset (ie, when the buffer is used for a
static source, the offset will range between 0 (inclusive) and the byte length
(exclusive)). Although an application could use the AL_SIZE, AL_CHANNELS,
AL_BITS, and AL_FREQUENCY properties to find the length in samples and seconds,
the byte length cannot be reliably calculated this way.
2011-10-01 06:19:55 -07:00
Chris Robinson
92f95e4d94
Add support for AL_EXT_ALAW
2011-10-01 04:55:03 -07:00
Chris Robinson
b615c7d0a2
Use arrays instead of large switches to decompose formats
2011-09-18 19:06:19 -07:00
Chris Robinson
1fdc25df75
Use a RWLock to protect access to a buffer instead of the device lock
2011-09-11 03:57:40 -07:00
Chris Robinson
cc67f45892
Use the reference counting functions for the buffer and auxiliary slot refs
2011-08-29 23:10:02 -07:00
Chris Robinson
38db4115fc
Fix a comment
2011-05-05 22:36:26 -07:00
Chris Robinson
0e824914b2
Use signed samples for 8-bit storage
2011-05-05 18:54:10 -07:00
Chris Robinson
d50f9249d6
Add support for packed 24-bit samples
2011-04-26 18:17:50 -07:00
Chris Robinson
4a1c0fedca
Use the defines for the UserFmt* and Fmt* types
2011-03-16 05:47:07 -07:00
Chris Robinson
9581325b9c
Rename SrcFmt -> UserFmt
2010-12-03 22:33:41 -08:00
Chris Robinson
8e43b1fe04
Let the storable format enum values share the input format enum values where they overlap
2010-11-29 23:57:07 -08:00
Chris Robinson
55262bc6e9
Make the decompose functions return false when given an unhandled format
2010-11-29 20:34:33 -08:00
Chris Robinson
0cf32e2946
Reorder some parameters for consistency
2010-11-29 19:48:18 -08:00
Chris Robinson
e4869b447c
Store the decomposed source format in the buffer
2010-11-29 19:27:33 -08:00
Chris Robinson
017ab1b3fd
Add IMA4 as a source data type
2010-11-29 17:14:22 -08:00
Chris Robinson
07ef566de1
Add support for (unsigned) int input formats
2010-11-29 17:00:22 -08:00
Chris Robinson
3c8a29a179
Reorder and rename parameters for the format decomposition functions
2010-11-29 15:19:39 -08:00
Chris Robinson
f74032d244
Uninline a couple more functions
2010-11-29 15:01:27 -08:00
Chris Robinson
eb489ac886
Store double formats as float
...
The mixer will cut it down to float anyway, so it's unnecessary and needlessly
creates more mixer functions
2010-11-28 23:07:57 -08:00
Chris Robinson
0e748d98d5
Rename some stuff for consistency
2010-11-28 13:08:51 -08:00
Chris Robinson
c41e893361
Don't store the internal format in the buffer
...
The type and channel config are good enough
2010-11-28 12:53:35 -08:00
Chris Robinson
2fd8d6916b
Support rear formats directly in the mixer
2010-11-27 22:55:20 -08:00
Chris Robinson
754a122aa0
Support muLaw with LoadData
2010-11-27 22:00:24 -08:00
Chris Robinson
8828f4d0e5
Don't inline the decompose function
2010-11-27 15:37:51 -08:00
Chris Robinson
9495cf71fd
Decompose input buffer formats and use it when converting uncompressed data
2010-11-27 15:33:33 -08:00
Chris Robinson
4d0f70439c
Rename a function
2010-11-27 14:30:13 -08:00
Chris Robinson
2a123a4760
Support 64-bit double buffers directly
2010-11-27 00:32:53 -08:00