Commit Graph

199 Commits

Author SHA1 Message Date
Chris Robinson 20ef8bf390 Move cpu_caps and fpu_ctrl to core 2020-12-31 16:47:12 -08:00
Chris Robinson ec7e7c9174 Avoid ugly reinterpret_casts with offsetof 2020-12-29 09:57:08 -08:00
Chris Robinson 96942d7968 Combine multiple functions into one 2020-12-28 08:37:49 -08:00
Chris Robinson aae115c35a Return an intrusive_ptr from EffectStateFactory::create 2020-12-28 08:04:23 -08:00
Chris Robinson 15e05fcef8 Workaround a GCC 5 constexpr function bug 2020-12-28 03:36:26 -08:00
Chris Robinson 62fa6a2277 Avoid including voice.h in alcontext.h 2020-12-27 16:14:11 -08:00
Chris Robinson cd2ebb9c3a Use a uint for a bitfield 2020-12-27 01:05:16 -08:00
Chris Robinson e20143fcc4 Move the WetBuffer reference to EffectSlot 2020-12-27 00:14:58 -08:00
Chris Robinson 507cbfa027 Combine EffectState::deviceUpdate with setBuffer 2020-12-26 12:33:00 -08:00
Chris Robinson 54719de132 Avoid AL enums for the EffectSlot type 2020-12-26 09:21:30 -08:00
Chris Robinson 8a86ec8ac5 Add a crossover frequency field for the device
Used when upsampling low-order ambisonic signals to higher order. Rather than a
hardcoded 400hz, it ensures a consistent crossover point when an ambdec
configuration is used. It can also allow for an alsoft config option.
2020-12-26 05:23:08 -08:00
Chris Robinson 0d3b041aa2 Avoid AL types and enums in the effect processors 2020-12-24 22:49:55 -08:00
Chris Robinson eedc42890f Move alexcpt to core 2020-12-24 22:49:55 -08:00
Chris Robinson 7d2e21334c Move the AL error enum out of base_exception 2020-12-17 16:46:21 -08:00
Chris Robinson d578bc6cb1 Move logging to core 2020-12-17 02:47:03 -08:00
Chris Robinson f0fe57dc5a Don't link DistanceModel enums to AL values 2020-12-16 14:58:55 -08:00
Chris Robinson efc9c146c3 Move AsyncEvent to a separate header 2020-12-16 13:58:51 -08:00
Chris Robinson c96b50fb65 Use a separate enum for the VoiceChange state 2020-12-16 01:40:15 -08:00
Chris Robinson 5ad28f8cba Move VoiceChange to a separate header 2020-12-16 00:50:50 -08:00
Chris Robinson 304ab8d890 Avoid a generic event struct 2020-12-15 21:32:01 -08:00
Chris Robinson daf9d46478 Use a separate structure for the context/listener params 2020-12-15 18:41:50 -08:00
Chris Robinson 191fe888b4 Move ambidefs.h to core 2020-12-12 10:38:24 -08:00
Chris Robinson 69d55d7e03 Move the filters to core 2020-12-04 11:15:50 -08:00
Chris Robinson 8750810f5c Change a couple macros into constexpr variables 2020-11-28 03:38:20 -08:00
Chris Robinson 32b9a46b39 Move AL EffectProp handling to separate sources 2020-11-25 13:55:29 -08:00
Chris Robinson a913aa6ba8 Make sure batched source updates are with the proper voice 2020-11-24 10:49:53 -08:00
Chris Robinson 21174047df Make ALbuffer inherit from BufferStorage 2020-11-21 00:54:25 -08:00
Chris Robinson 2cb2ffef72 Disassociate internal buffer enums from AL enum values 2020-11-20 04:27:10 -08:00
Chris Robinson f85e76285f Disassociate internal voice enums from AL enums 2020-11-20 01:37:19 -08:00
Chris Robinson 03f9700071 Use BufferStorage for the buffer queue 2020-11-19 04:18:25 -08:00
Chris Robinson 537510afc8 Put the loop start/end in BufferStorage 2020-11-19 03:23:46 -08:00
Chris Robinson 0498ca200d Use an array of auxslot pointers instead of IDs to lookup 2020-11-07 12:58:19 -08:00
Chris Robinson 4e760bbecc Use a separate structure for the active effect slot properties 2020-11-07 08:36:49 -08:00
Chris Robinson 52d58a4023 Store the wet buffers in the context
This is rather ugly, but we need the wet buffers to remain allocated after its
effect slot is deleted, because a voice can still use it for its final fade-out
mix.
2020-11-02 04:24:36 -08:00
Chris Robinson 7bb37deb51 Replace the mixer fraction macros with constexpr variables 2020-10-21 17:16:27 -07:00
Chris Robinson 3e62600ecc Replace some more macros with constexpr variables 2020-10-21 16:39:21 -07:00
Chris Robinson b8f5e1f424 Change some more macros into constexpr variables 2020-10-21 10:39:00 -07:00
Chris Robinson 7b43cb8266 Declare variables closer to where they're used 2020-10-13 05:54:05 -07:00
Chris Robinson 303ca3af72 Use inline functions for popcnt and ctz instead of macros 2020-10-13 01:21:44 -07:00
Chris Robinson 45ff10fb4d Use a span instead of a pointer and count parameters 2020-10-12 23:58:54 -07:00
Chris Robinson 191150d9a8 Remove deprecated, performance, and error event types
These would be better served with a proper debug API, rather than a general
audio event API.
2020-09-20 04:11:52 -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 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 0ad7bb577a Don't allow callback buffers for effect slots 2020-08-27 21:10:00 -07:00