Chris Robinson
b28f48c1bd
Store the filter gains directly in the source instead of duplicate filter objects
2011-08-31 02:18:16 -07:00
Chris Robinson
9fb91f70aa
Rename GetReffedContext to GetContextRef
2011-08-30 23:28:38 -07:00
Chris Robinson
0a1321aaae
Add a limit to the UIntMap size and use it for sources and effect slots
2011-08-30 20:33:47 -07:00
Chris Robinson
7d577832cd
Add functions to retrieve the source from the source map while removing it
2011-08-30 17:32:49 -07:00
Chris Robinson
ee60248d19
Lock the context while deleting sources only as needed
2011-08-30 00:33:01 -07:00
Chris Robinson
d546813c05
Don't lock the context while checking the validity of objects
2011-08-30 00:04:02 -07:00
Chris Robinson
f02d9e22d7
Do a pointer exchange when replacing the source buffer queue
2011-08-29 23:55:24 -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
c6a110ec59
Hold the context lock as needed while generating and deleting sources
2011-08-29 22:51:18 -07:00
Chris Robinson
f5195ee4f2
Remove the Buffer field from the source
2011-08-23 09:55:22 -07:00
Chris Robinson
9f25ad42c1
Explicitly set BufferListStart's prev field
2011-08-23 09:27:35 -07:00
Chris Robinson
199df253ca
Always use the thunk functions to get object IDs
2011-08-22 07:40:14 -07:00
Chris Robinson
c1f435cc18
Don't use the thunk array for object lookups
2011-08-22 07:22:02 -07:00
Chris Robinson
858592832f
Defer source offset changes requested by the app
2011-08-21 00:49:04 -07:00
Chris Robinson
a97211b572
Use -1 to mark an invalid source offset instead of 0
2011-08-21 00:35:37 -07:00
Chris Robinson
f196a9fc67
Defer source state changes from alSourcePlay/Pause/Stop/Rewind calls
2011-08-20 23:59:24 -07:00
Chris Robinson
7ea71d8bfa
Use a separate function to set the source state
2011-08-20 06:31:10 -07:00
Chris Robinson
36446f3a58
Make sure source vectors are finite values
2011-07-20 03:18:46 -07:00
Chris Robinson
5f566ebf05
Fade between HRTF coefficients, to reduce noise from sudden changes
2011-07-16 16:24:01 -07:00
Chris Robinson
ac7ca07221
Get rid of a couple typedefs
2011-07-02 21:33:53 -07:00
Chris Robinson
723755788d
Rename Suspend/ProcessContext since they are locking a mutex
2011-06-30 18:10:04 -07:00
Chris Robinson
5736bbc3e4
Add a source property to skip channel virtualization for multi-channel buffers
...
With virtualization disabled, channels are mapped directly from input to output
and any input channel that is missing an output is dropped. Any virtualization
effects (such as HRTF filters) for positional cues are also skipped.
The idea is to allow applications a way to play pre-filtered audio that channel
vitualization effects could interfere with.
2011-06-29 23:18:49 -07:00
Chris Robinson
1fc44d5788
Select the mixer during a source update
2011-06-25 00:13:56 -07:00
Chris Robinson
0d39ac6528
Allow alThunkAddEntry to return a proper error
2011-06-17 23:59:25 -07:00
Chris Robinson
edf78b077e
Use separate lines for HRTF history and values
2011-06-17 16:22:39 -07:00
Chris Robinson
23ae3c69b5
Handle the device's disconnected status earlier when playing a source
2011-06-17 13:21:02 -07:00
Chris Robinson
7d73ac4405
Avoid calling some AL functions from under the context lock
...
There are still some more occurances to clear out (deletion in gen error,
effects, some filters), which shall be coming up. There is a possibility for a
deadlock between the listlock and the global/context lock, if another attempt
to get the listlock is made while under the context lock.
2011-06-16 09:14:41 -07:00
Chris Robinson
7ddfacb58f
Use a minimum phase HRTF data set
...
This reduces the coefficient size from 128 down to 32, with a set of delays
2011-06-03 01:06:00 -07:00
Chris Robinson
c00b2f9254
Avoid looking in the buffer queue to find the frame size
2011-05-18 17:02:18 -07:00
Chris Robinson
06f5f0b7c8
Make mixers channel-count agnostic
...
As a result, this combines/removes a bunch of mixers
2011-05-17 13:25:15 -07:00
Chris Robinson
2972de1047
Use function pointers to call the source mixer
2011-05-06 00:20:40 -07:00
Chris Robinson
f843b7e2e3
Implement HRTF mixers for multi-channel sources
2011-05-02 02:22:30 -07:00
Chris Robinson
56d9418119
Add an HRTF filter for mono sources
...
The data is based on the KEMAR HRTF data provided by MIT, which can be found at
<http://sound.media.mit.edu/resources/KEMAR.html >. The compact measurements
were used. See hrtf_tables.inc for more information.
The filter is only available for stereo output, using a 44100hz playback rate.
Note also that it currently only applies to mono sounds, and the cf_level and
head_dampen config options are ignored while it is active.
2011-05-01 13:59:44 -07:00
Chris Robinson
d8048e136f
BufferFreq doesn't need to be a float
2011-02-09 11:19:33 -08:00
Chris Robinson
023658605e
Constify some variables
2010-12-09 19:47:08 -08:00
Chris Robinson
1b7be672fa
No need to clamp the app-specified pitch
2010-12-03 23:08:26 -08:00
Chris Robinson
9581325b9c
Rename SrcFmt -> UserFmt
2010-12-03 22:33:41 -08:00
Chris Robinson
0cf32e2946
Reorder some parameters for consistency
2010-11-29 19:48:18 -08:00
Chris Robinson
693ab4d8bc
Fix source offset calculations
2010-11-29 19:36:33 -08:00
Chris Robinson
e4869b447c
Store the decomposed source format in the buffer
2010-11-29 19:27:33 -08:00
Chris Robinson
547f356131
Keep a handle on the buffer with the format when queueing new buffers
2010-11-29 17:35:22 -08:00
Chris Robinson
f09ae196a8
Avoid making Resampler[Pre]Padding static
2010-11-28 17:37:14 -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
b4eaf1ab5a
Avoid a potential overflow when setting the source offset
2010-11-27 22:22:14 -08:00
Chris Robinson
3c8e9a7f24
Clean up the source byte offset code
2010-11-27 22:13:29 -08:00
Chris Robinson
67ec72284d
Remove some unneeded muLaw special cases
2010-11-27 22:06:51 -08:00
Chris Robinson
61315d4dfb
Shorten a couple really long lines
2010-11-27 00:51:21 -08:00
Chris Robinson
d2895c7985
Use the enums in a couple more places
2010-11-27 00:15:07 -08:00