Chris Robinson
5d7815beed
Only apply ambient gain to available output channels
2010-04-27 11:39:54 -07:00
Chris Robinson
110be7f500
Add an option to scale the output mix
2010-04-23 07:54:43 -07:00
Chris Robinson
a04dac670e
Make stereo duplication a property of the device
...
Further, don't use it with mono/stereo output
2010-04-20 03:57:40 -07:00
Chris Robinson
fc2473f826
Translate the source position separately
...
This is to handle the case where an app specifies the same values for the
source and listener, and expects centered panning. This fails due to floating-
point errors in the matrix, causing the result to be ever-so-slightly off of 0.
This error would normally be hidden by the position normalization, which will
not lengthen a distance shorter than the reference distance so the panning
would be nearly imperceptible. But that also fails if the reference distance
is set to 0, causing the position to expand to a full unit.
Keep the 4x4 matrix calculations, however. It will still be useful for the
requested listener matrix extension.
2010-04-16 02:09:53 -07:00
Chris Robinson
000d848f0b
Return immediately when no layout is specified
2010-04-11 23:03:36 -07:00
Chris Robinson
3c5007352e
More type fixes
2010-04-11 20:17:43 -07:00
Chris Robinson
e0fa497948
Use a linear scaling when sending multi-channel sources to auxiliary slots
2010-04-11 15:20:46 -07:00
Chris Robinson
f082c73539
Use proper types for some variables
2010-04-11 14:33:22 -07:00
Chris Robinson
d4f8bd665f
Only consider output speakers for the panning LUT
2010-04-11 14:23:10 -07:00
Chris Robinson
488ec612bb
Avoid hard-coding the channel count
2010-04-09 14:21:47 -07:00
Chris Robinson
484702a2e5
Get the speaker arrangement before setting up the channel matrix
2010-04-09 12:27:30 -07:00
Chris Robinson
371058fb9e
Re-enable stereo duplication
2010-04-08 23:00:14 -07:00
Chris Robinson
97b00670f5
Use the proper type for the speaker-to-channel map
2010-04-08 18:05:24 -07:00
Chris Robinson
aace50ebf4
Store the panning LUT in the device
2010-04-08 15:58:11 -07:00
Chris Robinson
49201e892b
Use a single layout for the virtual speakers
...
The downmix should probably be improved to take the angles into account
2010-04-08 15:41:32 -07:00
Chris Robinson
068c0076af
Set the device channel matrix when the device is reset
2010-04-08 15:02:03 -07:00
Chris Robinson
37c93a6ad8
Always mix internally at 8.1
...
The channels are remixed when writing to the output buffer. Stereo duplication
is currently broken, but this can be restored later
2010-04-08 14:47:12 -07:00
Chris Robinson
1b1c76da34
Invert device channel map array
2010-04-08 13:11:21 -07:00
Chris Robinson
eea23a012a
Relax circular layout requirement
2010-03-20 00:54:44 -07:00
Chris Robinson
ec917e8e2f
Rename some struct members for consistency
2010-03-16 15:37:41 -07:00
Chris Robinson
08b1bed38b
Remove a couple incorrect comments
2010-03-10 07:16:53 -08:00
Chris Robinson
1f10195c47
Use powf when available
2010-03-07 22:12:33 -08:00
Chris Robinson
931f5875cd
Fix speaker angle fixup
2010-01-12 09:11:46 -08:00
Chris Robinson
505f61ff43
Properly trace the invalid speaker angle
2010-01-12 08:50:32 -08:00
Chris Robinson
574792d2e1
Fix Windows compilation
2010-01-11 23:47:03 -08:00
Chris Robinson
ab2eb5a603
Check buffer size when copying padding instead of the data pointer
2010-01-11 10:58:33 -08:00
Chris Robinson
3d7f925d52
Add helpful values to the resampler enum
2010-01-11 07:02:29 -08:00
Chris Robinson
93b584ff84
Add a cosine resampler
2010-01-11 06:19:54 -08:00
Chris Robinson
705849ca73
Add an option for point resampling
2010-01-11 05:37:20 -08:00
Chris Robinson
1a57f095e8
Hold global lock during mixing only when iterating device contexts
2010-01-11 03:57:49 -08:00
Chris Robinson
a0ef7be9a5
Improve layout parsing and allow using long names for speakers
2009-12-28 11:49:55 -08:00
Chris Robinson
7f0c6629b9
Use a 64-bit value to scale potentially-large numbers
2009-12-24 15:41:45 -08:00
Chris Robinson
ddfad996a9
Don't render mono as stereo
2009-12-21 02:59:30 -08:00
Chris Robinson
d786f99094
Scale samples down when converting stereo to mono
2009-12-21 02:27:25 -08:00
Chris Robinson
008563450c
Improve some indentations
2009-12-20 21:50:00 -08:00
Chris Robinson
69c238a2e6
Properly retrieve the device frequency
2009-12-20 21:19:57 -08:00
Chris Robinson
56cc038603
Improve initial decay calculations for sends to reverb
2009-12-10 18:37:36 -08:00
Chris Robinson
4c83c689a8
Use the specified reverb air absorption value for wet sends
2009-12-10 18:22:45 -08:00
Chris Robinson
368ef1cea9
Store the source state locally after making sure it needs mixing
2009-12-09 11:56:53 -08:00
Chris Robinson
656a406377
Use an inline function to calculate the low-pass filter coefficient
2009-12-09 07:21:59 -08:00
Chris Robinson
5fcd6cc510
Split non-attenuated source calculations into a separate function
2009-12-09 07:02:26 -08:00
Chris Robinson
84d2d623b6
Add a head-dampening option
...
This simulates occlusion of the player's head for sounds coming from behind,
when outputing to mono or stereo
2009-12-08 14:18:07 -08:00
Chris Robinson
1694e5bd12
Store the original pre-clamped distance instead of re-computing it
2009-12-08 10:12:18 -08:00
Chris Robinson
5170e251f9
Use the correct wet filter history offset
2009-12-07 12:45:23 -08:00
Chris Robinson
4697e946d3
Internally store 32-bit float buffer data, and mix accordingly
2009-12-07 10:35:30 -08:00
Chris Robinson
8138446b8c
Restrict setting some wet path values to active sends only
2009-12-06 03:59:12 -08:00
Chris Robinson
b5270e0bb3
Use a channel-map to specify the output device channel order
2009-12-02 04:03:51 -08:00
Chris Robinson
d5889a941f
Clamp dry gain after cone attenuation is applied
2009-12-01 03:32:04 -08:00
Chris Robinson
98ce1d14c1
Update AL_EXTX_source_distance_model to require explicit enabling
...
The in-progress spec has been updated to reflect this
2009-11-27 20:05:21 -08:00
Chris Robinson
69f9ab88b9
Send multi-channel sources to auxiliary effect slots
...
They are downmixed to mono using a volume-preserving scalar, and passed
through a 1-pole low-pass filter (not chained)
2009-11-26 00:39:32 -08:00