Chris Robinson
a8162a77c2
Use an array of ALvoice pointers for the active voices
...
This allows growing the array atomically with the mixer since the ALvoice
objects themselves don't move, and a new larger array of them can be swapped in
without blocking the mixer.
2020-02-21 20:14:28 -08:00
Chris Robinson
6e6a30679e
Set the voice's property update after the source ID
...
Otherwise the mixer has a chance to throw it out before realizing it's needed.
2020-02-21 04:55:04 -08:00
Chris Robinson
0694df9014
Handle playing and pausing with VoiceChanges
2020-02-21 04:29:32 -08:00
Chris Robinson
9887c6971d
Prepare VoiceChange objects one at a time
2020-02-21 03:23:22 -08:00
Chris Robinson
9b801227d5
Don't unnecessarily count all voices when playing sources
2020-02-21 00:54:05 -08:00
Chris Robinson
9b43327f56
Asynchronously stop and rewind voices
2020-02-20 23:53:56 -08:00
Chris Robinson
bdb8ef22b0
Asynchronously stop voices if its source is being deleted
2020-02-20 22:50:37 -08:00
Chris Robinson
acf7f6f74e
Add a voice flag to indicate a voice has a pending stop
...
Pending/asynchronous stops to be implemented soon.
2020-02-20 19:18:07 -08:00
Chris Robinson
642ef4edc9
Add a streaming example using a callback buffer
2020-02-20 17:53:09 -08:00
Chris Robinson
3aad01d3ba
Add AL_SOFTX_callback_buffer to the extension list
2020-02-19 17:32:32 -08:00
Chris Robinson
4277c05b0c
Workaround a 32-bit GCC/MinGW TLS bug
2020-02-18 18:14:59 -08:00
Chris Robinson
d4e01a1818
Flag the voice as callback-based when given a callback buffer
2020-02-17 17:34:17 -08:00
Chris Robinson
04e5b23286
Don't bother looping the calculated source offset
...
The offset shouldn't be in a non-wrapped state when playing, and when not
playing it's always 0 anyway.
2020-02-17 17:30:47 -08:00
Chris Robinson
d6e49b503b
Don't allow setting a source offset for a callback
2020-02-17 17:20:01 -08:00
Chris Robinson
3122c3b4a1
Handle running the buffer callback in the voice
2020-02-17 17:13:25 -08:00
Chris Robinson
c8dfd24818
Add a callback flag for voices
2020-02-17 04:50:00 -08:00
Chris Robinson
a221f8671e
Prevent queueing a callback buffer
...
Also prevent setting it on multiple sources
2020-02-17 00:32:22 -08:00
Chris Robinson
ccc6da0a5b
Set and retrieve a buffer's callback
2020-02-17 00:22:51 -08:00
Chris Robinson
3156b17057
Stub out an interface for a callback-driven buffer
2020-02-16 23:49:29 -08:00
Chris Robinson
8665f404a5
Always start streaming sources from the start of the queue
...
For sources that don't start with an offset, at least. This is necessary so the
completed buffer event will give the correct count if it starts with null or
empty buffers that become processed.
2020-02-15 22:37:19 -08:00
Chris Robinson
be89684f3c
Update the makemhr utility and default HRTF
2020-02-11 01:01:10 -08:00
Chris Robinson
1d91e282c8
Update the MHR format
...
This update removes the 16/24-bit sample type enum, now always being 24-bit
(other than a very small size saving, there's no practical benefit to storing
16-bit samples). This also reverses the field storage, so no on-load fixup is
needed, and stores the IR delays with 2 bits of sub-sample precision, allowing
for slightly better timing (after resampling, blending, etc).
2020-02-11 00:37:21 -08:00
Chris Robinson
3acc667c28
Scale delays when exceeding the max for generated mhr files
2020-02-10 22:25:07 -08:00
Chris Robinson
6ebdf3ab62
Use a triplet struct array instead of separate arrays
2020-02-09 14:25:20 -08:00
Chris Robinson
f2bc24f761
Consistently use distant wavefronts for 0 distance
2020-02-08 22:39:32 -08:00
Chris Robinson
85395b23a4
Clear voice target gains earlier
2020-02-08 18:10:59 -08:00
Chris Robinson
3ee0906c81
Use std::array and span for the HRTF delays
2020-02-08 15:00:58 -08:00
kcat
e72a02c5e2
Merge pull request #393 from Etwus/patch-1
...
Fix unreachable code warning
2020-02-08 15:00:26 -08:00
Aleš Gajdacz
7e319ad99b
Fix unreachable code warning
2020-02-08 23:34:09 +01:00
Chris Robinson
ebb1aaa06d
Make sure stereo angles are kept in-range.
2020-01-31 11:11:06 -08:00
Chris Robinson
e960276a47
Try harder to find the closest HRIR for the B-Format decoder
2020-01-26 01:23:39 -08:00
Chris Robinson
bd7937e5b5
Update the default HRTF
2020-01-25 16:59:07 -08:00
Chris Robinson
f63880c2ff
Use the peak IR magnitude to get the onset
...
While maybe not technically correct, we actually only care about the difference
between onsets (any base constant is removed). This should work better since it
determines when the IR is most audible, whereas previously it used a variable
threshold of when it reached 15% of the max amplitude.
An even better method may be to check where the IR amplitude exceeds a fixed
threshold (i.e. the same threshold applied to all IRs), but that would need
tweaking to find a level that doesn't catch random noise and doesn't
potentially miss the more occluded IRs.
2020-01-25 16:59:07 -08:00
kcat
3cd4af1b8e
Merge pull request #385 from sergeyext/fix_msvc_runtime
...
Set static MSVC runtime for cpp files when FORCE_STATIC_VCRT is ON.
2020-01-25 15:44:30 -08:00
Sergey Karchevsky
3001d56d4b
Set static MSVC runtim for cpp files when FORCE_STATIC_VCRT is ON.
...
Fixes #384
2020-01-26 05:38:37 +07:00
Chris Robinson
f5e0eef34d
Release 1.20.1
2020-01-23 23:28:45 -08:00
Chris Robinson
43780913cd
Fix the output channel count for the B-Format decoder
2020-01-19 13:40:39 -08:00
Chris Robinson
3904289af7
Only sort active effect slots as needed
2020-01-18 18:53:58 -08:00
Chris Robinson
8a9eef70af
Use struct methods to get a buffer's format info
2020-01-18 13:23:59 -08:00
Chris Robinson
32c9dbd7ff
Avoid an extraneous index map
2020-01-15 10:45:08 -08:00
Chris Robinson
6a8c6eae6f
Make a couple helper methods to create BFormatDec
2020-01-15 10:33:56 -08:00
Chris Robinson
fcfcb88b28
Repack B-Format decoder fields
...
This should better provide sequential access.
2020-01-15 10:09:41 -08:00
Chris Robinson
c112acadaf
Transpose BFormatDec's matrices
...
This allows the band-split and output mix to happen together, rather than
splitting all input channels first and then mixing them to output.
2020-01-14 23:08:04 -08:00
Chris Robinson
030d428aec
Clean up some formating
2020-01-14 13:10:01 -08:00
Chris Robinson
75a58ae333
Simplify appending delayed samples
2020-01-14 12:13:00 -08:00
Chris Robinson
5324bdb908
Signal the event handler only once per update
2020-01-14 10:39:41 -08:00
Chris Robinson
400c768e2f
Inline a couple ring buffer methods
2020-01-14 10:17:57 -08:00
Chris Robinson
e889282131
Get rid of an unnecessary struct
2020-01-13 19:45:13 -08:00
Chris Robinson
a1a107f576
Return immediately on error when loading HRTFs
2020-01-13 18:13:05 -08:00
Chris Robinson
aca1d02024
Get the audio sync once per update in alffplay
2020-01-13 17:31:35 -08:00