67 Commits

Author SHA1 Message Date
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
Chris Robinson
987fd13796 Use a new voice when restarting a playing source 2019-09-06 21:20:20 -07:00
Chris Robinson
e5c9643dd5 Combine two functions into one 2019-09-05 15:08:22 -07:00
Chris Robinson
97c043da07 Don't set voice properties in ApplyOffset 2019-09-05 04:00:49 -07:00
Chris Robinson
ef2769af03 Use a normal vector for the voices array 2019-09-04 23:04:55 -07:00
Chris Robinson
3d7ce5a860 Use global placement new for AL object batches 2019-09-01 18:07:16 -07:00
Chris Robinson
bb35e24c9b Avoid unnecessary placement new definitions 2019-09-01 17:54:17 -07:00
Chris Robinson
727217ce0a Ensure AL_STOPPED state change events are sent
With explicit calls to alSourceStop on a playing or paused source
2019-09-01 15:28:33 -07:00
Chris Robinson
aee10ef606 Hold the source lock in UpdateAllSourceProps 2019-09-01 00:29:26 -07:00
Chris Robinson
3973334a64 Store the voice fraction offset as unsigned 2019-08-31 15:49:34 -07:00
Chris Robinson
024d5d900a Dereference the correct buffer when destructing a source 2019-08-21 03:00:19 -07:00
Chris Robinson
351ccf2e11 Use new/delete for context and effectslot properties 2019-08-13 22:25:59 -07:00
Chris Robinson
ecab99bce9 Move update pointers to the containers they update 2019-08-13 22:06:14 -07:00
Chris Robinson
0806a003e2 Use new/delete for listener properties 2019-08-13 20:33:44 -07:00
Chris Robinson
91ff01d1ad Don't explicitly inline a particular function 2019-08-13 20:33:26 -07:00
Chris Robinson
81d17bb80f Fix some return types 2019-08-12 14:30:47 -07:00
Chris Robinson
1aaf65abfe Add methods to get env vars as an optional 2019-08-12 03:59:52 -07:00
Chris Robinson
50d16d2422 Don't use INT_MAX for unknown span lengths
32-bit doesn't like it, for some reason. Use the largest possible length it
could be.
2019-08-11 22:48:18 -07:00
Chris Robinson
7118733458 Remove multiple buffers per queue item
And simplify related code
2019-08-11 14:01:57 -07:00
Chris Robinson
dca2365051 Fix array access index 2019-08-10 20:31:08 -07:00
Chris Robinson
7c069e29ee Update some more includes 2019-08-06 23:13:05 -07:00
Chris Robinson
d24401c3f3 Move the meters per unit property to the listener 2019-08-05 12:15:14 -07:00
Chris Robinson
3154a915b1 Remove the ReverbSpeedOfSound hack
No other effect depends on context or listener properties, so reverb being the
only exception for speed of sound and meters per unit was putting extra work on
the effect engine for no real reason. Especially since the reverb decay time
should be the time actual time to decay irrespective of other settings.
2019-08-05 11:37:05 -07:00