Chris Robinson
8003278a55
Combine non-attenuated source calculation functions
2010-08-07 06:57:31 -07:00
Chris Robinson
5f22d30fc9
Calculate the source stepping value with the param calculations
2010-08-07 05:43:16 -07:00
Chris Robinson
f4304ca062
Calculate the actual stepping value in the source update method
2010-08-07 00:38:02 -07:00
Chris Robinson
98bc60cfb7
Combine stereo and stereo-duplicate mixers
...
Use a separate update method for stereo sources to the set appropriate channel
gains
2010-08-05 01:07:20 -07:00
Chris Robinson
0dc3f1984e
Move the core mixer functions to a separate source file
2010-08-03 23:19:36 -07:00
Chris Robinson
e74976e645
Use a callback to specify the source update method
2010-08-03 23:10:00 -07:00
Chris Robinson
91278608c5
Add some spacing
2010-08-03 01:44:52 -07:00
Chris Robinson
8e2d765671
Move active source iteration to aluMixData
2010-08-03 01:09:02 -07:00
Chris Robinson
2af39e51f8
Separate speaker/panning initialization into another source file
2010-08-03 00:21:36 -07:00
Chris Robinson
41e2c41ecc
Combine duplicate lines into the mixing macro
2010-07-31 21:09:59 -07:00
Chris Robinson
30108c7855
Remove an unnecessary variable
2010-07-31 19:14:27 -07:00
Chris Robinson
7eb124d99c
Keep count of the number of samples played
2010-07-22 08:11:44 -07:00
Chris Robinson
6db3463d17
Fix backslash alignment for the single-channel mixer macro
2010-07-06 16:32:58 -07:00
Chris Robinson
7f6df7695c
Use an array of active sources when mixing
...
Prevents iterating over all allocated sources during mixing updates
2010-06-06 00:17:50 -07:00
Chris Robinson
90db244b5f
Skip mixing after checking looping validity
2010-06-03 03:58:04 -07:00
Chris Robinson
8cfac7c6b8
Don't bother storing the loop points in the source
2010-05-24 01:07:13 -07:00
Chris Robinson
6dab9d54d1
Use the loop start when filling in padding data for looping sources
2010-05-13 06:52:44 -07:00
Chris Robinson
7ed5d12717
Pay attention to the source loop points
2010-05-13 04:53:21 -07:00
Chris Robinson
23b2c1f902
Only use a modulo to loop when the source is static
2010-05-13 02:12:50 -07:00
Chris Robinson
af4faaf666
Use a UIntMap for the effect slot list
2010-05-12 02:20:14 -07:00
Chris Robinson
d678f1d88b
Store looping locally when mixing a source
2010-05-12 00:38:04 -07:00
Chris Robinson
099c2f3593
Use a simple loop to set multi-channel dry gains
2010-05-09 22:06:10 -07:00
Chris Robinson
0378422fcb
Use a map to store sources and buffers
...
And do a lookup using a binary search instead of linear
2010-05-01 19:59:41 -07:00
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