7489 Commits

Author SHA1 Message Date
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 c1ad5d6055 Avoid confusing */*...*/ syntax
MSVC warns about */ being outside of a comment.
2020-09-05 14:28:08 -07:00
Chris Robinson 7e3fed42ed Use a recursive_mutex for the router enumeration lock 2020-09-05 12:41:28 -07:00
Chris Robinson 73f5331305 Use an RAII wrapper to manage COM object references 2020-09-05 12:32:41 -07:00
Chris Robinson 88f7617807 Avoid duplicate WASAPI devices by matching GUIDs 2020-09-04 18:32:06 -07:00
Chris Robinson afdd1c67ad Update changelog 2020-09-03 13:25:51 -07:00
Chris Robinson 9e862900fe Update some UHJ comments 2020-09-02 15:50:11 -07:00
Chris Robinson fe329c2af2 Avoid class templates for the POPCNT64/CTZ64 macros 2020-09-01 15:55:48 -07:00
Chris Robinson 1968136c98 Add an in-progress extension string for convolution reverb 2020-09-01 07:37:07 -07:00
Chris Robinson eeba1a385c Don't use config.h to define RESTRICT 2020-09-01 06:22:50 -07:00
Chris Robinson a6aefeccd8 Use enum class for a couple enums 2020-09-01 05:46:19 -07:00
Chris Robinson 02e51c0525 Avoid using a deprecated function 2020-08-31 17:48:26 -07:00
Chris Robinson af97a92952 Move more processing to the ConvolutionFilter struct 2020-08-31 06:43:42 -07:00
Chris Robinson 88425becb2 Remove a couple unnecessary pointers 2020-08-30 04:41:19 -07:00
Chris Robinson 82873486b7 Dynamically allocate the convolution channel mixing data 2020-08-30 04:28:01 -07:00
Chris Robinson ebe0765ce3 Reorganize some convolution fields 2020-08-30 03:42:44 -07:00
Chris Robinson 8724c1ce4b Remove extraneous parenthesis 2020-08-28 23:28:20 -07:00
Chris Robinson 3fdee6c814 Calculate the correct number of convolution segments 2020-08-28 23:08:44 -07:00
Chris Robinson ecfb0d4f5b Limit convolution processing to the output ambisonic order 2020-08-28 06:47:21 -07:00
Chris Robinson 7266cd8b6c Don't dereference a null convolution filter 2020-08-28 06:44:05 -07:00
Chris Robinson 52531d8b72 Support B-Format impulse responses for convolution 2020-08-28 05:48:26 -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 a9ebcdcb7f Handle 0-length convolution buffers 2020-08-27 21:32:25 -07:00
Chris Robinson 0ad7bb577a Don't allow callback buffers for effect slots 2020-08-27 21:10:00 -07:00
Chris Robinson 3c09f17421 Blend panned B-Format source directivity given its radius 2020-08-27 08:44:29 -07:00
Chris Robinson 2a01940041 De-duplicate LoadSampleArray and FmtTypeTraits 2020-08-26 21:29:16 -07:00
Chris Robinson 97ecf5810f Base the convolution example on the simpler stream example 2020-08-26 17:23:50 -07:00
Chris Robinson 577a8234f2 Recognize float32 format names for the example healpers 2020-08-26 17:15:30 -07:00
Chris Robinson 9dab2db33b Avoid copying the convolution filter history to shift it
Instead, the current/head/newest segment is tracked, and decremented with each
process to overwrite the oldest.
2020-08-25 15:43:48 -07:00
Chris Robinson 309be1c6f6 Add an example using convolution reverb 2020-08-25 04:59:04 -07:00
Chris Robinson 801c7a9226 Initial implementation of the convolution effect
Currently limited to mono and stereo impulse responses, and stereo IRs try to
use direct/real output rather than panning.
2020-08-25 04:21:10 -07:00
Chris Robinson e98a058595 Fix handling doubles 2020-08-25 02:38:44 -07:00
Chris Robinson a6bd53c4e1 Store a reference to the effect buffer as an active property 2020-08-24 20:40:24 -07:00
Chris Robinson 1a9fbc1b2f Stub out a convolution effect state 2020-08-24 20:04:16 -07:00
Chris Robinson b955479e18 Recognize a convolution reverb effect type 2020-08-24 20:00:58 -07:00
Chris Robinson 9e5a388dfe Add a method for effects to create persistent buffer data 2020-08-24 19:13:46 -07:00
Chris Robinson 9d61484e4b Move storable buffer format info to a separate source 2020-08-24 17:59:07 -07:00
Chris Robinson 73ab9d46c8 Use an intrusive_ptr to hold the unapplied effect state 2020-08-24 16:34:53 -07:00
Chris Robinson f9d6aa2f48 Allow setting a buffer on an effect slot 2020-08-24 16:08:09 -07:00
Chris Robinson 54a0972bfe Clean up some comments 2020-08-24 14:26:47 -07:00
Chris Robinson ff5c9d1c15 Use an intrusive_ptr for ALeffectslotProps::State 2020-08-24 14:09:26 -07:00
Chris Robinson 01f76f2b67 Allow intrusive_ptr::reset to take a new pointer 2020-08-24 14:09:26 -07:00
HALX99 de060ce09a macOS osx/ios dynamic framework support (#466)
* OSX bundle support

* Disable framework by default, and fix domain name typo

* Remove info.plist, add efx.h for framework public header

* Fix osx/ios framework PUBLIC_HEADER doesn't work

* Refine comment message

* Auto set CFBundleShortVersionString by var LIB_VERSION

* Set CFBundleVersion from git commit count

* Use space to separate elements in a list

* Specific framework name to variable 'IMPL_TARGET'

* Solve cmake try_compile failed with code sign, and disable framework code sign

* Make ios travis to build dynamic framework bundle by default

* Update ios.toolchain.cmake

Since we solve code sign issue for cmake to generate dynamic framework xcode project, enable strict try_compile by default

* Remove MAKE_CXX_EXTENSIONS from travis-ci

* Combined flat lib armv7;arm64 support

* Remvoe ios.toolchain.cmake since we don't need
[skip appveyor] [skip travis]

* Sets framework name to soft_oal,
avoid ambiguous with system OpenAL.framework

* Fix missing BUNDLE, FRAMEWORK's DESTINATION
Build osx/ios dynamic framework required them.

* Use @rpath instead fullPath to mac local disk
see also:
https://github.com/libjpeg-turbo/libjpeg-turbo/commit/c80ddef7a4ce21ace9e3ca0fd190d320cc8cdaeb

* CMake, use TRUE for bool value

* Don't disable examples, utils, install

* Make ALSOFT_OSX_FRAMEWORK for APPLE spec

* Remove unused flag and more clearly comment

* More clearly comment for solve armv7 target issue

Co-authored-by: deal <deal@dealdeMac.local>
Co-authored-by: bel <bel@beldeMac.local>
2020-08-24 14:09:02 -07:00
Chris Robinson 4eba5c34e9 Use CMAKE_DLLTOOL instead of looking for dlltool manually 2020-08-20 16:46:51 -07:00
Chris Robinson 34b29a48a4 Ensure enough space is allocated for structs with a FlexArray 2020-08-15 23:53:43 -07:00