Chris Robinson
531c0d8e6b
Explicitly pass the address of atomics and parameters that can be modified
2014-07-26 03:00:49 -07:00
Chris Robinson
5a339a2a5b
Add macros for generic atomic functionality
2014-07-22 00:20:28 -07:00
Chris Robinson
f4cdecebcf
Add a source radius property that determines the directionality of a sound
...
At 0 distance from the listener, the sound is omni-directional. As the source
and listener become 'radius' units apart, the sound becomes more directional.
With HRTF, an omni-directional sound is handled using 0-delay, pass-through
filter coefficients, which is blended with the real delay and coefficients as
needed to become more directional.
2014-07-11 00:03:13 -07:00
Chris Robinson
ff915534cd
Avoid aliasing an int array
2014-07-05 02:01:36 -07:00
Chris Robinson
0ec0f7561c
Add an option to get the length of a source's full queue
...
This simplifies keeping track how much a source has buffered in its queue,
which reduces a bunch of unnecessary book keeping the app would have to do.
2014-05-25 16:16:55 -07:00
Chris Robinson
e32e3df3aa
Use the first non-0-length buffer when starting a source
2014-05-22 11:08:21 -07:00
Chris Robinson
82dd2d875e
Apply high-pass source filters as needed
2014-05-17 07:54:25 -07:00
Chris Robinson
debd5346fb
Add a couple asserts to ensure a proper buffer
...
It should not be possible for a playing or paused source to not have a
valid buffer, but Clang's static analyzer doesn't know that. Hopefully
an assert will convince it.
2014-05-14 03:40:01 -07:00
Chris Robinson
1d2504d12e
Make RefCount a non-integer type
...
It should only be accessed through the appropriate functions to ensure proper
atomicity.
2014-05-14 02:47:07 -07:00
Chris Robinson
4454ae25c7
Add HF Reference as a filter property
2014-05-14 01:24:18 -07:00
Chris Robinson
3582a44dff
Make LOWPASSFREQREF a float value
2014-05-11 10:09:52 -07:00
Chris Robinson
343200d229
Store the filter reference frequency in the source
2014-05-11 10:07:17 -07:00
Chris Robinson
b89cc3417b
Avoid locking the mixer when unqueueing buffers
2014-05-11 03:52:22 -07:00
Chris Robinson
9f8615c670
Avoid accessing the source's buffer queue head multiple times
2014-05-11 03:11:35 -07:00
Chris Robinson
851a917b03
Use a struct to store the source's direct gain/gainhf properties
2014-05-11 01:40:44 -07:00
Chris Robinson
ddd1550a8b
Avoid locking the mixer while queueing buffers onto a source.
2014-05-10 08:55:28 -07:00
Chris Robinson
3e28fb33a3
Add a missing pointer init
2014-05-10 07:57:35 -07:00
Chris Robinson
9642bf637d
Explicit init the source queue and current_buffer pointers
2014-05-10 06:32:39 -07:00
Chris Robinson
a455704148
Use a RWLock to help protect the source's buffer queue
...
In some instances this allows to to remove the device/mixer lock, or reduce how
long it's held.
2014-05-10 05:07:13 -07:00
Chris Robinson
eebde08e65
Don't explicitly store the BuffersInQueue
2014-05-10 03:33:41 -07:00
Chris Robinson
c4383b65e2
Store the current buffer queue item, rather than played buffer count
2014-05-10 03:21:40 -07:00
Chris Robinson
d066c7b124
Better pack HRTF mixing properties
2014-05-03 18:59:26 -07:00
Chris Robinson
52deb557d5
Add gain stepping to the send mixers
2014-03-23 16:11:21 -07:00
Chris Robinson
0ce0a88fd6
Move the step counter and moving flag to DirectParams
2014-03-23 03:03:03 -07:00
Chris Robinson
b0d511a860
Store the HrtfState directly in the DirectParams
2014-03-23 02:45:50 -07:00
Chris Robinson
6ee54fb1f3
Store some source mixing parameters in the active source struct
2014-03-19 13:14:11 -07:00
Chris Robinson
d6f7aac1bb
Use a separate struct for tracking active sources
2014-03-18 19:56:25 -07:00
Chris Robinson
a1c440bd09
Add an extension to support MSADPCM buffer formats
2014-03-04 22:44:30 -08:00
Chris Robinson
c442c93a93
Store the original frame size alignment in the buffer
2014-03-03 17:05:08 -08:00
Chris Robinson
57eef756c3
Fix retrieving source properties
2013-12-09 13:04:16 -08:00
Chris Robinson
d3c70e63b4
Use C99 inline in more places
2013-11-04 13:44:46 -08:00
Chris Robinson
7142e3828f
Rename alcGetLatency to ALCdevice_GetLatency
2013-11-02 12:01:58 -07:00
Chris Robinson
af8be56f17
Use an ALCbackend object to access playback backends
...
This is the start of a backend redesign. Currently, a wrapper object is used to
avoid having to redo all the backends at once, but they should slowly be
converted to derive from ALCbackend instead. The ALCbackend interface can
change as needed.
2013-10-27 14:24:55 -07:00
Chris Robinson
4f72da0005
Return only true or false from the source getters and setters
2013-10-07 11:10:49 -07:00
Chris Robinson
69d373db78
Remove al_try from alSource.c
2013-10-07 09:24:50 -07:00
Chris Robinson
9ee3d01f6e
Use a simpler U64 macro to make 64-bit constants
2013-10-06 04:21:03 -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
a371de080b
Silence some clang warnings
2013-06-05 01:52:49 -07:00
Chris Robinson
43b406ad9b
Simplify al_try code
2013-03-24 13:55:41 -07:00
Chris Robinson
eb5073a8a7
Properly convert uint values when getting them as int64
2012-12-07 18:43:13 -08:00
Chris Robinson
beb84bdc21
SetSourceiv should never get AL_SAMPLE_OFFSET_LATENCY_SOFT
2012-12-06 09:03:48 -08:00
Chris Robinson
a20f1fa779
Use a helper to count the number of float/double values for a property
2012-12-05 20:51:25 -08:00
Chris Robinson
7445ffe1a6
Use a helper to count the number of int(64) values for a property
2012-12-05 19:58:01 -08:00
Chris Robinson
c225c59b0a
Remove 'v' from the source enum names
2012-12-05 18:27:05 -08:00
Chris Robinson
37a6705556
Add a comment to note the extension for sfvDistanceModel
2012-12-05 13:48:33 -08:00
Chris Robinson
ed5738bfa4
Use an enum to handle int source properties
2012-12-05 09:55:05 -08:00
Chris Robinson
5e14a83030
Use an enum to handle float source properties
2012-12-05 09:22:38 -08:00
Chris Robinson
3b9b176f14
Print an error if trying to handle a missed source property
2012-12-05 08:29:38 -08:00
Chris Robinson
838f0fd71b
Fix retrieving source gain
2012-12-05 08:27:02 -08:00
Chris Robinson
fc7adccd6f
Fix retrieving the source's write offset
2012-11-01 23:41:18 -07:00