2133 Commits

Author SHA1 Message Date
Chris Robinson
30a7c6d86f Pass the voice state as a parameter instead of reloading it 2019-03-11 20:00:14 -07:00
Chris Robinson
2c67ab0d2c Rename ALvoice fields for consistency 2019-03-10 16:29:06 -07:00
Chris Robinson
030b24a40d Improve handling of voice's AmbiScales for upsampling 2019-03-10 15:46:46 -07:00
Chris Robinson
0d295cf811 Don't directly use a buffer for updating source parameters 2019-03-10 11:52:39 -07:00
Chris Robinson
87479b4b32 Play dummy samples and force a fade out on stopping voices 2019-03-09 18:34:00 -08:00
Chris Robinson
ef0f335132 Add a Stopping state for voices
This currently doesn't do much, except have the mixer progress it to Stopped.
It's valid to have without a source or buffers, and in the future will allow
fading out when a source is paused or stopped.
2019-03-09 16:48:07 -08:00
Chris Robinson
cde4500e24 Increment the active voice count ahead of playing the sources 2019-03-09 15:04:51 -08:00
Chris Robinson
d39cfcc7bb Clear the voice's buffer when detaching from source 2019-03-09 13:20:10 -08:00
Chris Robinson
2d14de3fb0 Use more specific names for temp buffer storage 2019-03-02 23:41:26 -08:00
Chris Robinson
cadff0f6c1 Reduce BUFFERSIZE to match the default period size
Also adds a bit more space to the temp source data buffer, to avoid needing to
loop on matching sample rates.
2019-02-24 16:13:51 -08:00
Chris Robinson
317206e8f3 Remove the FOAOut mixing buffer and associated post-processes 2019-02-22 22:35:37 -08:00
Chris Robinson
45378fe687 Remove the unused FOAOut EffectTarget 2019-02-22 22:03:04 -08:00
Chris Robinson
169a11dffc Add some preliminary fields for mix-time ambisonic upsampling 2019-02-21 04:57:56 -08:00
Chris Robinson
8ac2d34706 Allow processing some effects in higher order ambisonics
Reverb notably is still only first-order (any higher order channels are
dropped, and it writes to FOAOut). But others, like the equalizer, work on all
available channels.
2019-02-21 04:23:01 -08:00
Chris Robinson
8d2d7c63da Get rid of the MAX_EFFECT_CHANNELS macro 2019-02-21 03:52:54 -08:00
Chris Robinson
4b4041319d Pass the number of input channels to EffectState::process 2019-02-21 02:57:39 -08:00
Chris Robinson
7e00f646d9 Add a method to get the row of an ambisonic identity transform 2019-02-21 02:13:30 -08:00
Chris Robinson
3966665ca3 Store effect slots in groups of 64
Now that their wet buffers are allocated dynamically, the ALeffectslot object
itself is rather small.
2019-02-20 22:00:26 -08:00
Chris Robinson
c43381d811 Allocate the effect slot wet buffer dynamically 2019-02-20 21:01:08 -08:00
Chris Robinson
194fcb6bb7 Rename MAX_AMBI_COEFFS and MAX_AMBI2D_COEFFS 2019-02-19 15:39:33 -08:00
Chris Robinson
69f6f56160 Avoid using internal AL[u]int64 types 2019-02-11 12:16:58 -08:00
Chris Robinson
dac609b29a Move some more functions to alnumeric.h 2019-02-11 11:31:31 -08:00
Chris Robinson
21aaa18c50 Get rid of the FAM_SIZE macro 2019-02-11 11:14:34 -08:00
Chris Robinson
995c9649cb Move some number-related stuff to a separate header 2019-02-11 11:07:06 -08:00
Chris Robinson
69d8c6546d Use std::arrays for HRIR coeffs and values 2019-02-07 08:38:49 -08:00
Chris Robinson
05cdc2cb30 Use relaxed memory ordering for initializing atomic_flags 2019-02-04 21:28:37 -08:00
Minmin Gong
41b9d473a2 Fix compiling problems on VS2019 with vc142 toolset
Msvc142 in VS2019 preview 2 doesn't allow std::atomic_flag to be initialized by a bool. Call test_and_set in the constructors instead.
2019-02-04 20:03:18 -08:00
Chris Robinson
7757789590 Clean up the NFC filters a bit 2019-01-23 16:32:53 -08:00
Chris Robinson
867161d55f Constify some parameters 2019-01-12 21:08:34 -08:00
Chris Robinson
d64eaba322 Use a flexible array for DirectHrtfState and ALvoice 2019-01-12 01:25:33 -08:00
Chris Robinson
f8c2e54b47 Make the min/max/clamp functions constexpr 2019-01-11 21:04:50 -08:00
Chris Robinson
77447fcd54 Add placement operator delete 2019-01-11 20:06:23 -08:00
Chris Robinson
81e7222633 Use a flexible array for the active effect slots 2019-01-11 07:28:44 -08:00
Chris Robinson
e7d77f5caa Use a vector for ALeffectslotArray 2019-01-09 18:29:22 -08:00
Filip Gawin
4169c6f37d Use c++ headers 2019-01-09 19:42:40 +01:00
Chris Robinson
b49c45d3a4 Add prefixes for ALCdevice and ALCcontext 2019-01-09 00:31:57 -08:00
Chris Robinson
173c97c2db Remove an unused macro 2019-01-08 21:51:56 -08:00
Chris Robinson
d7eee03272 Replace a couple more C-style casts 2019-01-08 19:08:03 -08:00
Filip Gawin
0d3a0635d9 Avoid using old style casts
To think about:
examples/alffplay.cpp:600
OpenAL32/Include/alMain.h:295
2019-01-08 19:42:44 +01:00
kcat
2a7f27ca58
Merge pull request #260 from ShFil119/impr/nullptr
Use nullptr in cpp files
2019-01-07 04:36:50 -08:00
Chris Robinson
4d047e2bc1 Use user-defined literals for 64-bit literals 2019-01-07 04:06:40 -08:00
Filip Gawin
0537414baf Use nullptr in cpp files 2019-01-07 12:37:13 +01:00
Chris Robinson
648b76ed65 Move some macros to a common header 2019-01-07 01:12:09 -08:00
Chris Robinson
da3a916042 Replace macros with constexpr inline functions 2019-01-06 04:16:51 -08:00
Chris Robinson
3f35fcc4b5 Simplify MixParams and AmbiUpsampler
Since the dry buffer is always an ambisonic target now
2019-01-05 21:59:04 -08:00
Chris Robinson
399dfca1e3 Rename ALCdevice_struct and ALCcontext_struct
A (possibly contentious?) change in the public headers. Those names were never
part of any specification, and I don't know why the struct names differed from
the actual type name. But with C++, which takes the original struct declaration
as the original name, it was affecting the type's internal symbols.

This shouldn't affect user code since ALCdevice_struct and ALCcontext_struct
were never part of the spec. If issues arise from this change, it should be
reported.
2019-01-01 18:13:33 -08:00
Chris Robinson
1630a33567 Use standard unique_lock and lock_guard for the backend lock 2019-01-01 16:42:54 -08:00
Chris Robinson
2f1566e0b4 Add and use a make_unique function 2019-01-01 14:33:01 -08:00
Chris Robinson
a9e71c2668 Handle all input channels in MixDirectHrtf 2018-12-31 23:33:04 -08:00
Chris Robinson
d8eecc89e0 Pass a reference to an array instead of a pointer 2018-12-31 18:07:00 -08:00