89 Commits

Author SHA1 Message Date
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
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
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
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
cdd24c7d01 Combine identical arrays 2020-01-04 00:59:49 -08:00
Chris Robinson
701d43b41e Start a new extension for a new direct_channels state
So existing behavior remains consistent for anything that needs it, and new
behavior is opt-in.
2019-12-28 11:33:19 -08:00
Chris Robinson
863171efc9 Check the voice's ambisonic order when starting 2019-12-05 00:18:01 -08:00
Chris Robinson
38037e29ba Handle the buffer's ambisonic properties 2019-12-02 12:50:18 -08:00
Chris Robinson
799c60f3bb Add an interface to set a B-Format buffer's layout and scaling 2019-12-02 11:51:27 -08:00
Chris Robinson
b79aa32308 Store the ambisonic order for the voice
Currently only first-order B-Format is possible for a buffer/source, but this
will begin to allow for higher orders with an appropriate extension.
2019-12-01 15:36:25 -08:00
Chris Robinson
0cba99ed1b Avoid static constexpr for arrays iterated over at run-time 2019-10-25 01:43:23 -07:00
Chris Robinson
cf617760b6 Separate a couple assignments from conditionals 2019-09-30 03:03:27 -07:00
Chris Robinson
0139d8a04f Remove noexcept from a function that explicitly throws 2019-09-30 02:57:19 -07:00
Chris Robinson
31ffb0887c Don't let a function end without a return 2019-09-28 13:56:51 -07:00
Chris Robinson
f7b574c8f2 Redo resampler strings to be safer
Now the name is guaranteed to match the type, and to be ordered as the enum
declares.
2019-09-28 03:15:48 -07:00
Chris Robinson
882b4acae8 Add "fast" variants for the bsinc resamplers
This simply omits the scale factor from the filter, similar to how up-sampling
does. The consequence of this is less smooth transitions when ramping the
pitch while down-sampling, but otherwise behaves fine.
2019-09-28 01:58:29 -07:00
Chris Robinson
d50ca464cd Use a span for holding the source handles 2019-09-25 03:01:58 -07:00
Chris Robinson
24db8a3f4b Make the resampler type an enum class 2019-09-22 21:19:19 -07:00
Chris Robinson
564c953e94 Make the buffer frequency unsigned 2019-09-21 16:47:33 -07:00
Chris Robinson
66565ca7a3 Enable and fix some more warnings 2019-09-18 10:09:04 -07:00
Chris Robinson
899a414591 Remove the last uses of the system's str[n]casecmp 2019-09-16 15:10:36 -07:00
Chris Robinson
2c5c5a5397 Add and use custom string types and functions 2019-09-16 13:45:14 -07:00
Chris Robinson
bf2c865d39 Clean up some more shadowing warnings 2019-09-16 07:16:31 -07:00
Chris Robinson
e4cc77ea23 Fix a few warnings from MSVC 2019-09-14 20:19:59 -07:00
Chris Robinson
807d3b64ca Enable and fix more warnings 2019-09-14 18:35:23 -07:00
Chris Robinson
2c348cecb6 Fix some more implicit conversions noted by GCC 2019-09-14 18:35:23 -07:00
Lopuska
0023614da5
pass proper effects slot number to AddActiveEffectSlots
It resolves wrong logic when creating more than 1 aux slot at time in a batch
2019-09-15 02:09:05 +02:00
Chris Robinson
42ae95b8fa Remove a couple no-op statements 2019-09-13 14:44:52 -07:00
Chris Robinson
df306b5524 Make NumAuxSends unsigned 2019-09-13 04:15:05 -07:00
Chris Robinson
5ca8796d6a Clean up some lambda definitions 2019-09-12 17:10:33 -07:00
Chris Robinson
70b58d79fe Fix source limit check 2019-09-12 12:19:07 -07:00
Chris Robinson
6ca8fadd58 Fix counting free objects 2019-09-12 12:14:23 -07:00
Chris Robinson
ac48569c69 Avoid a macro call and mark unlikely paths as unlikely 2019-09-12 11:59:36 -07:00
Chris Robinson
2e010d29cb Clean up implicit conversions in source.cpp 2019-09-12 11:33:04 -07:00
Chris Robinson
c0ce03d8b9 Get rid of more implicit conversions 2019-09-12 06:29:32 -07:00
Chris Robinson
07e2aa3bc0 Clean up some more implicit conversions 2019-09-11 14:33:26 -07:00
Chris Robinson
681c78d348 Allocate buffer batches separately from buffers 2019-09-11 12:28:33 -07:00
Chris Robinson
be0442c620 Avoid C-style casts in C++ 2019-09-11 06:47:56 -07:00
Chris Robinson
388928f3aa Fix some more implicit casts 2019-09-11 05:53:10 -07:00