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
Chris Robinson
e1c0b5ea24
Call MixSource directly, instead of through a function pointer
2010-11-25 23:09:18 -08:00
Chris Robinson
596514f7aa
Make the buffer queue a double-linked list
2010-11-25 18:30:57 -08:00
Chris Robinson
c9363832fe
Fully progress the source to a stopped state when no buffers are playable
2010-11-24 10:16:53 -08:00
Chris Robinson
5f6f046d25
Use a double when converting millisecond offsets to byte offsets
2010-11-07 21:41:04 -08:00
Chris Robinson
c95f182a90
Remove unnecessary comments and reorder some lines
2010-11-06 14:07:30 -07:00
Chris Robinson
9fbd6c6c3f
Make the SourceMix function a method of the ALsource struct
2010-09-26 01:15:27 -07:00
Chris Robinson
97daaade8a
Reduce some more indentation
2010-09-21 16:54:33 -07:00
Chris Robinson
8a1d5a21c3
Reduce some indentation
2010-09-21 15:12:08 -07:00
Chris Robinson
301a8ba3a4
Improve some range checks
2010-09-21 14:41:43 -07:00
Chris Robinson
2d4453968d
Implement AL_SOFT_buffer_sub_data using the current AL_EXT_buffer_sub_data spec
...
This extension can be useful for some applications, but a full EXT version may
not be ready for some time. Using the SOFT moniker will help differentiate it
in case changes need to be done for the EXT version.
2010-09-21 09:43:35 -07:00
Chris Robinson
a2358ffc41
Source positions at and after the end of the buffer queue go back to 0
2010-09-09 18:27:14 -07:00
Chris Robinson
6e32812bc1
Remove unnecessary check
2010-09-07 22:38:29 -07:00
Chris Robinson
50a7be6385
Fix comparison check
2010-09-07 22:23:37 -07:00
Chris Robinson
1e82561a22
Check for invalid negative sizes
2010-09-07 16:18:24 -07:00
Chris Robinson
ba32a52bb6
Remove unused struct member
2010-09-07 16:07:35 -07:00
Chris Robinson
2915d9dbd9
Use click removal to handle harsh panning/volume changes
2010-08-15 00:19:38 -07:00
Chris Robinson
0c49e5ba56
Use click removal when starting a source
2010-08-14 22:59:55 -07:00
Chris Robinson
8003278a55
Combine non-attenuated source calculation functions
2010-08-07 06:57:31 -07:00
Chris Robinson
8f49f2c25e
Forward some more source properties instead of duplicating
2010-08-07 01:35:43 -07:00