aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix dirty flag checkChris Robinson2021-04-181-1/+1
|
* Don't require RTKit for Xenial CIChris Robinson2021-04-181-1/+0
| | | | It apparently doesn't have DBus1Config.cmake in its libdbus-1-dev package.
* Require RTKit for Linux CIChris Robinson2021-04-182-3/+7
|
* Optionally use RTKit/D-Bus to set elevated priorityChris Robinson2021-04-187-18/+528
| | | | If pthread_setschedparam fails or is unavailable.
* Restore missing AL_SOFT_source_length queriesChris Robinson2021-04-151-0/+93
|
* Make an inverted atomic flag type and use itChris Robinson2021-04-1510-23/+46
| | | | | | | | The inverted atomic flag replaces test_and_set+clear with test_and_clear+set, essentially inverting the flag status. This makes more logical sense for flagging dirty state, which is less confusing than flagging clean state. The one caveat is ATOMIC_FLAG_INIT (or default construction in C++20) initializes the state to true rather than false.
* Fix inverted check for updating deferred effectslot propertiesChris Robinson2021-04-131-1/+1
|
* Don't reference non-static local variables in lambdasChris Robinson2021-04-111-2/+2
| | | | GCC and Clang seem to allow it for local constexpr variables, but MSVC doesn't.
* Update a commentChris Robinson2021-04-111-1/+1
|
* Fix UHJ encoding/decoding factorsChris Robinson2021-04-113-17/+37
| | | | | | | | | | | Classic B-Format uses scaling factors W=1, X=sqrt(2), Y=sqrt(2), and Z=sqrt(2), which is +3dB louder than FuMa. The base factors are designed assuming classic scaling, so encoding a 0dBFS FuMa signal without accounting for this would result in the UHJ signal peaking at about -3dBFS. Similarly, decoding UHJ to FuMa B-Format would be +3dB louder than intended. So encoding needs to implicitly boost the signal by +3dB, and decoding needs to attenuate by -3dB.
* Use per-HRIR delay alignment for B-Format-to-HRTFChris Robinson2021-04-091-6/+11
| | | | | | | | | | | | | For HOA signals, the number of responses used with slightly varying delays causes noticeable attenuation in the higher frequencies because of destructive phase interference. This is not a result of minimum phase alignment (attempts to compensate for minimum phase had negligible results), nor does it affect first-order signals (which only has 4 unique responses on each side). This alternate alignment is only used when doing second-order rendering for HRTF output, which is not the default with HRTF. It's likely not very ideal, but it's necessary to prevent second-order rendering with HRTF from sounding muffled.
* Log the reset exception errorChris Robinson2021-04-071-0/+1
|
* Add RESTRICT to some pointersChris Robinson2021-04-041-11/+9
| | | | And update some comments
* Add an option to decode stereo as UHJ in alffplayChris Robinson2021-04-021-76/+137
|
* Advertise the in-progress AL_SOFT_UHJ extensionChris Robinson2021-04-011-1/+12
|
* Rename Uhj2Encoder to UhjEncoderChris Robinson2021-04-016-12/+12
|
* Avoid passing an array of pointersChris Robinson2021-04-013-33/+31
|
* Add support for 4-channel UHJChris Robinson2021-03-3111-35/+64
| | | | Also add the SOFT moniker to the new macros
* Handle 3-channel UHJ audio buffersChris Robinson2021-03-319-12/+30
|
* Decode UHJ buffers to B-Format for mixingChris Robinson2021-03-3110-82/+214
| | | | | This should also have an adjustment for the shelf filter. Although it's not clear what the appropriate adjustments should be.
* Start an interface for providing UHJ audioChris Robinson2021-03-317-2/+45
| | | | Currently only 2-channel UHJ, which gets treated as stereo.
* Combine some duplicate codeChris Robinson2021-03-304-90/+53
|
* Rename a couple class membersChris Robinson2021-03-282-12/+12
|
* Remove some unnecessary includesChris Robinson2021-03-282-12/+0
|
* Move the UHJ phase shifter to a common headerChris Robinson2021-03-286-400/+394
|
* Add the export definitions to the library projectsChris Robinson2021-03-282-6/+4
| | | | Instead of the config.h header.
* Add an option to change the UHJ decoder methodChris Robinson2021-03-261-27/+50
| | | | | | | | | | | | For 2-channel UHJ, two decoding equations are provided in the original paper. The alternative one is most often referenced for 2-channel UHJ decoding, but the original/general one can also be used by assuming T is fully attenuated (which the format allows for, as T can be variably attenuated by a factor between 0 and 1 to deal with an imperfect transmission medium). Neither method can be perfect for 2-channel UHJ, it's irrevocably lossy to the original source, but my subjective testing indicates the general equation produces less audibly errant results.
* Fix a comment typoChris Robinson2021-03-241-2/+2
|
* Update the UHJ decoding coefficientsChris Robinson2021-03-242-62/+71
|
* Don't add the resampler prepadding to the source size to loadChris Robinson2021-03-231-18/+17
|
* Add support for decoding 3- and 4-channel UHJ audioChris Robinson2021-03-211-32/+185
| | | | | | | There are no known file formats intended to support 3- and 4-channel UHJ, but it is possible to store them in various audio files when a player/decoder is aware of what it's dealing with. So there's no reason not to have it as an option.
* Don't assume two input channels in uhjdecoderChris Robinson2021-03-211-1/+1
|
* Add a utility to decode UHJ sound files to AMBChris Robinson2021-03-212-4/+531
| | | | | | Currently only supports 2-channel UHJ, and the produced .amb files shouldn't be played as normal B-Format (decoded 2-channel UHJ needs to use different shelf filters).
* Use float formats in examples/alstreamcbChris Robinson2021-03-211-10/+10
| | | | | | | libsndfile apparently has issues reading floating-point wave files as 16-bit samples (produces silence). Even on other file formats, reading float samples as integer samples has no over/underflow protection, so this is better for those formats too.
* Fix the UHJ all-pass delayChris Robinson2021-03-202-11/+8
| | | | | | | | | For real this time. The non-all-passed signal needs a one-sample delay over the all-passed signal. Because of the way the all-pass FIR filter is structured, it wouldn't otherwise use the last buffered sample, allowing it to be shifted forward in time by one sample. Also, remove a couple unnecessary buffers.
* Load/convert samples from all channels at once for mixingChris Robinson2021-03-195-123/+147
| | | | | | | This uses a bit more memory (each voice needs to hold buffers for the deinterleaved samples of each channel, instead of just one buffer for the current channel being mixed on the device), but it will allow for handling formats that need or prefer their channels decoded together.
* Merge pull request #543 from ilya-fedin/dont-force-app-namekcat2021-03-171-8/+1
|\ | | | | Don't force application name with pulseaudio
| * Don't force application name with pulseaudioIlya Fedin2021-03-181-8/+1
|/
* Don't activate the WASAPI device when initially opening itChris Robinson2021-03-171-17/+2
|
* Avoid returning objects with a reference parameterChris Robinson2021-03-161-13/+13
|
* Check that CoCreateInstance succeedsChris Robinson2021-03-161-13/+17
|
* Fix UHJ FIR filter alignmentChris Robinson2021-03-151-1/+1
|
* Workaround mingw complaining about the %z formatterChris Robinson2021-03-126-3/+30
|
* Avoid shadowing variable namesChris Robinson2021-03-111-6/+6
|
* Declare the attribute counts closer to where they areChris Robinson2021-03-101-25/+30
|
* Prevent querying the capture device name from a playback deviceChris Robinson2021-03-091-3/+16
| | | | And vice-versa.
* Don't verify and hold a device reference in alcRenderSamplesSOFTChris Robinson2021-03-091-5/+4
| | | | | | | | | | | | NULL devices are still checked, but invalid non-NULL device handles will invoke undefined behavior, as will attempting to close the device while the function is being executed (modifying the device state while the function is being called was inadvertently already UB, and will now remain so). This change is solely so alcRenderSamplesSOFT can be used in a buffer callback, and other places that need functions to be real-time safe. The verification requires locking to access the device list, which isn't allowed in a real-time callback.
* Add a function/extension to reopen a playback deviceChris Robinson2021-03-092-25/+112
|
* Initialize the new audio unit before disposing the old oneChris Robinson2021-03-091-6/+6
|
* Move the ComPtr wrapper to a common headerChris Robinson2021-03-084-126/+73
|