568 Commits

Author SHA1 Message Date
Chris Robinson
1075cce7b3 Mark some source properties volatile 2011-09-11 01:18:57 -07:00
Chris Robinson
30510dc478 Set the device-connected flag to false first when handling a disconnect 2011-09-10 19:22:46 -07:00
Chris Robinson
108b43458f Fix multichannel wet gainhf calculation 2011-09-02 02:54:00 -07:00
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
189add1d5a Use a separate array for the auxiliary slots in the mixer 2011-08-30 20:13:42 -07:00
Chris Robinson
7408396fd4 Use a generic int type to handle enum swaps 2011-08-29 21:30:12 -07:00
Chris Robinson
e4a2b69b37 Make specific functions to lock/unlock UIntMap access 2011-08-29 20:21:28 -07:00
Chris Robinson
8eaa9bb469 Manually lock the map while iterating through its contents 2011-08-29 20:05:50 -07:00
Chris Robinson
58078e2c1e Use atomic exchanges when checking for updates to objects' internal parameters 2011-08-29 00:50:55 -07:00
Chris Robinson
783375af56 Use a list of contexts in the device instead of an array 2011-08-28 19:28:41 -07:00
Chris Robinson
65d42083e1 Prevent source and effect slot updates from occuring while updates are deferred 2011-08-22 17:13:03 -07:00
Chris Robinson
e51295c79e Don't scale the wet send by the number of channels
Each channel should be treated as a distinct audio source, so multiple channels
should act as multiple sources.
2011-08-19 03:59:57 -07:00
Chris Robinson
14ffb8bd9b Coalesce some mixer sample converters 2011-08-17 02:33:25 -07:00
Chris Robinson
2f8510db31 Avoid reading some more source parameters multiple times when updating 2011-08-17 01:54:09 -07:00
Chris Robinson
9f5bf5f930 Rename minF/maxF/clampF to minf/maxf/clampf for consistency 2011-08-16 18:40:21 -07:00
Chris Robinson
04dad28228 Use mini/maxi/clampi and minu/maxu/clampu to replace min/max calls 2011-08-16 18:33:10 -07:00
Chris Robinson
8a51a7ea2d Use inline minF/maxF/clampF functions instead of the __min/__max macros 2011-08-16 04:21:58 -07:00
Chris Robinson
b3cb511c06 Fix wet path conehf calculation 2011-08-13 06:58:05 -07:00
Chris Robinson
412cec73de Avoid a temporary throw-away buffer for mixing null output 2011-08-12 15:42:36 -07:00
Chris Robinson
81d401eab5 Use specialized click removal loops for mono and stereo output 2011-07-30 05:43:47 -07:00
Chris Robinson
f97310c757 Apply the click removal offset first, before decreasing it 2011-07-17 07:23:19 -07:00
Chris Robinson
a7a1f802a8 Invert the device channel map 2011-07-17 01:55:25 -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
3bd7256dc8 Pass the effect slot to the effect update method 2011-07-16 03:02:16 -07:00
Chris Robinson
da2429a1d0 Allow effect slots to be updated asynchronously
Updates when the slot changes effect type is still sychronous, however, to
ensure a proper state for the Process method call. Fixing this would
essentially require all effects to work from the same state.
2011-07-16 02:41:02 -07:00
Chris Robinson
e56e462317 Fix default room air absorption 2011-07-11 22:07:37 -07:00
Chris Robinson
58466a304b Use a flag to signifiy that all sources need updating 2011-07-11 01:05:42 -07:00
Chris Robinson
bed264ad77 Use a Lock/UnlockDevice function instead of locking a NULL context 2011-07-06 02:58:43 -07:00
Chris Robinson
f8be0448b0 Don't modify the source's WetGain[HF]Auto because of a slot's state 2011-07-06 00:07:37 -07:00
Chris Robinson
75fa891e0a Store and use the send slot in the source params 2011-07-05 14:14:20 -07:00
Chris Robinson
21574f7e16 Scale the WetGain parameter directly instead of on each application 2011-07-05 14:00:11 -07:00
Chris Robinson
0903a7f1e0 Apply wet path calculations with their dry path equivalents
The auxiliary slot (and related effect) properties are retrieved at the same
time as the source properties. This will help ensure each property is accessed
from the source and slot only once.
2011-07-05 11:00:52 -07:00
Chris Robinson
c8d385c998 Use a helper to tell if an effect type is reverb 2011-07-05 04:36:41 -07:00
Chris Robinson
4c35bfbc10 Read the source's RoomRolloffFactor once 2011-07-05 03:55:16 -07:00
Chris Robinson
83e322c5f3 Force front-centered for mono sounds that comes from the listener under HRTF 2011-07-05 03:36:14 -07:00
Chris Robinson
b2d5367830 Fix rolloff calculations for auxiliary sends 2011-07-04 07:32:23 -07:00
Chris Robinson
d307ee8c2f Implement a lerped lookup of the HRTF coefficients/delays
Code supplied by Christopher Fitzgerald
2011-07-04 07:20:38 -07:00
Chris Robinson
202f57552a Use a proper enum for the distance model 2011-07-03 19:39:19 -07:00
Chris Robinson
5ba864b6da Calculate the wet gain decay time attenuation with linear values 2011-07-03 19:22:14 -07:00
Chris Robinson
30e97d5223 Read the RoomRolloffFactor property with the other properties 2011-07-03 03:34:40 -07:00
Chris Robinson
ac7ca07221 Get rid of a couple typedefs 2011-07-02 21:33:53 -07:00
Chris Robinson
4c94ba6d8a Properly save the original FPU state when using _controlfp 2011-07-02 02:56:06 -07:00
Chris Robinson
a5ccae5779 Do air absorption with linear gain values
This copies the way the calculation is done with the wet path
2011-07-01 02:30:15 -07:00
Chris Robinson
048aee66cf Avoid accessing source properties more than once when updating parameters 2011-07-01 01:46:56 -07:00
Chris Robinson
723755788d Rename Suspend/ProcessContext since they are locking a mutex 2011-06-30 18:10:04 -07:00
Chris Robinson
032d0836a7 Declare some variables closer to where they're used 2011-06-29 23:32:48 -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
1b773a8585 Select the correct resampler 2011-06-28 00:30:00 -07:00
Chris Robinson
efaaf9b5f9 Don't bother with a per-context lock for disconnecting devices 2011-06-26 01:26:50 -07:00
Chris Robinson
1fc44d5788 Select the mixer during a source update 2011-06-25 00:13:56 -07:00