Chris Robinson
9a883f5046
Partly simplify FFT bit-reversal
...
This can almost certainly be improved further, as less than half of the indices
really need their reversed bit-pattern calculated and elements swapped (any
symetrical bit pattern would just swap with itself, and indices whose reversed
bit-pattern has already been traversed is already swapped).
It may also prove beneficial to provide the base-2 log of the fft buffer size
(number of bits to represent the indices), as that could help make the reversal
more efficient with a known bit/loop count.
2020-09-13 03:33:52 -07:00
Chris Robinson
1d4b355622
Use standard sin and sqrt
2020-09-12 19:06:06 -07:00
Chris Robinson
bb90bfd9b3
Accumulate delays as samples before calculating nanoseconds
2020-09-12 01:52:45 -07:00
Chris Robinson
cf298075b5
Round (and clamp) the reftime instead of ceiling it
2020-09-12 00:47:04 -07:00
Chris Robinson
33d91ceeec
Avoid repeating string literals
2020-09-11 01:40:36 -07:00
Chris Robinson
a4bfba4cb5
Recognize GUID name strings with the DSound backend
2020-09-10 22:05:25 -07:00
Chris Robinson
21162cf5fc
Allow JACK to enumerate custom devices
...
Each device being associated with a port name pattern it'll try connecting to.
2020-09-10 21:09:06 -07:00
Chris Robinson
bb63d5aab3
Simplify clearing an array
2020-09-09 23:21:46 -07:00
Chris Robinson
ce0a45cbc7
Don't assume iterators are pointers
2020-09-09 14:02:02 -07:00
Chris Robinson
68a099ba35
Apply the first convolution segment in the time domain
...
This avoids an inherent delay from the effect, at the cost of higher CPU use.
Having a customizable user-specified delay (with said user ensuring a properly
trimmed impulse response) could help alleviate the cost since once the delay
exceeds the segment size, the initial FIR filter could be skipped.
2020-09-09 02:23:38 -07:00
Chris Robinson
f4a55cc8c2
Don't leave the negative frequencies as 0 for inverse FFT
2020-09-08 23:20:06 -07:00
Chris Robinson
29566b995c
Avoid an extraneous ConvolutionFilter sub-object
2020-09-06 00:16:50 -07:00
Chris Robinson
7eb5dfb3f8
Allow querying the new enums and functions
2020-09-05 23:53:53 -07:00
Chris Robinson
f5163ca988
Print the name and format for alconvole's impulse response
2020-09-05 23:48:19 -07:00
Chris Robinson
800e2b6125
Cleanup and fix alAuxiliaryEffectSlotPlayv/StopvSOFT
2020-09-05 21:39:31 -07:00
Chris Robinson
13710b474e
Ensure effect slot properties are updated when playing
2020-09-05 21:04:41 -07:00
Chris Robinson
c52bf8c401
Rework effect slot buffer setting
...
Rather than creating an effect-specific buffer that gets passed along as a
property, the buffer is set the effect state when the effect state is created,
the device is updated, or the buffer is changed. The buffer can only be set
while the effect slot isn't playing, so it won't be changed or updated while
the mixer is processing the effect state.
2020-09-05 20:48:56 -07:00
Chris Robinson
9975aeb37f
Add methods to start and stop effect slot processing
...
A newly-created effect slot is in an AL_INITIAL state, in which processing is
stopped but will automatically become AL_PLAYING after successfully setting an
AL_EFFECTSLOT_EFFECT value (including AL_EFFECT_NULL or 0). Calling Play[v] or
Stop[v] will set the effect slot to AL_PLAYING or AL_STOPPED respectively.
While stopped, the effect won't produce audio and will not be processed.
2020-09-05 19:11:57 -07:00
Chris Robinson
7851f7d4ce
Don't add effect slots to the active list until an effect is set
2020-09-05 18:13:08 -07:00
Chris Robinson
c1ad5d6055
Avoid confusing */*...*/ syntax
...
MSVC warns about */ being outside of a comment.
2020-09-05 14:28:08 -07:00
Chris Robinson
7e3fed42ed
Use a recursive_mutex for the router enumeration lock
2020-09-05 12:41:28 -07:00
Chris Robinson
73f5331305
Use an RAII wrapper to manage COM object references
2020-09-05 12:32:41 -07:00
Chris Robinson
88f7617807
Avoid duplicate WASAPI devices by matching GUIDs
2020-09-04 18:32:06 -07:00
Chris Robinson
afdd1c67ad
Update changelog
2020-09-03 13:25:51 -07:00
Chris Robinson
9e862900fe
Update some UHJ comments
2020-09-02 15:50:11 -07:00
Chris Robinson
fe329c2af2
Avoid class templates for the POPCNT64/CTZ64 macros
2020-09-01 15:55:48 -07:00
Chris Robinson
1968136c98
Add an in-progress extension string for convolution reverb
2020-09-01 07:37:07 -07:00
Chris Robinson
eeba1a385c
Don't use config.h to define RESTRICT
2020-09-01 06:22:50 -07:00
Chris Robinson
a6aefeccd8
Use enum class for a couple enums
2020-09-01 05:46:19 -07:00
Chris Robinson
02e51c0525
Avoid using a deprecated function
2020-08-31 17:48:26 -07:00
Chris Robinson
af97a92952
Move more processing to the ConvolutionFilter struct
2020-08-31 06:43:42 -07:00
Chris Robinson
88425becb2
Remove a couple unnecessary pointers
2020-08-30 04:41:19 -07:00
Chris Robinson
82873486b7
Dynamically allocate the convolution channel mixing data
2020-08-30 04:28:01 -07:00
Chris Robinson
ebe0765ce3
Reorganize some convolution fields
2020-08-30 03:42:44 -07:00
Chris Robinson
8724c1ce4b
Remove extraneous parenthesis
2020-08-28 23:28:20 -07:00
Chris Robinson
3fdee6c814
Calculate the correct number of convolution segments
2020-08-28 23:08:44 -07:00
Chris Robinson
ecfb0d4f5b
Limit convolution processing to the output ambisonic order
2020-08-28 06:47:21 -07:00
Chris Robinson
7266cd8b6c
Don't dereference a null convolution filter
2020-08-28 06:44:05 -07:00
Chris Robinson
52531d8b72
Support B-Format impulse responses for convolution
2020-08-28 05:48:26 -07:00
Chris Robinson
986a58d5b4
Pass a BufferStorage to EffectState::createBuffer
2020-08-28 00:44:55 -07:00
Chris Robinson
1f486f820e
Use a separate structure for buffer storage
2020-08-28 00:09:46 -07:00
Chris Robinson
ecf30de36f
Rename buffer_formats to buffer_storage
2020-08-27 23:02:17 -07:00
Chris Robinson
a9ebcdcb7f
Handle 0-length convolution buffers
2020-08-27 21:32:25 -07:00
Chris Robinson
0ad7bb577a
Don't allow callback buffers for effect slots
2020-08-27 21:10:00 -07:00
Chris Robinson
3c09f17421
Blend panned B-Format source directivity given its radius
2020-08-27 08:44:29 -07:00
Chris Robinson
2a01940041
De-duplicate LoadSampleArray and FmtTypeTraits
2020-08-26 21:29:16 -07:00
Chris Robinson
97ecf5810f
Base the convolution example on the simpler stream example
2020-08-26 17:23:50 -07:00
Chris Robinson
577a8234f2
Recognize float32 format names for the example healpers
2020-08-26 17:15:30 -07:00
Chris Robinson
9dab2db33b
Avoid copying the convolution filter history to shift it
...
Instead, the current/head/newest segment is tracked, and decremented with each
process to overwrite the oldest.
2020-08-25 15:43:48 -07:00
Chris Robinson
309be1c6f6
Add an example using convolution reverb
2020-08-25 04:59:04 -07:00