aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Allow calling BackendBase::open multiple times on playback devicesChris Robinson2021-03-0815-257/+360
| | | | | | | | | | | It will not be called while the device is running. If the first call succeeds, a subsequent call that happens to fail must leave the existing device state as it was so it can be resumed. This is a rough first pass. It will fail when trying to re-open the same device which can only be opened once (for instance, with direct hardware access, on hardware that doesn't do its own mixing). Some backends won't guarantee the new device is usable until the reset() or start() call.
* Use a fast native type for the backup popcountChris Robinson2021-03-021-7/+20
|
* Use the correct lock when allocating filtersChris Robinson2021-03-021-1/+1
|
* Avoid making BSincPointsMax publicChris Robinson2021-03-013-19/+30
|
* Avoid cutting off the last bsinc filter coefficientChris Robinson2021-03-011-3/+3
|
* Avoid trying to get the app path when it fails on Windows tooChris Robinson2021-02-271-9/+10
|
* Avoid calling readlink on platforms that don't support itChris Robinson2021-02-271-11/+11
| | | | Also don't keep trying to find the path+name if it fails the first time.
* Avoiding cutting all bsinc resampler output at scale 0Chris Robinson2021-02-242-9/+8
| | | | | | | | | | | | This is mostly for the SampleConverter, used by some capture backends. When recording at really low rates, like 5512hz, with a device capturing at a higher rate like 44100hz or 48000hz, it hits the filter's downscaling limit and produces pure silence. In such cases, it's better to just accept some aliasing noise so that the app will still get some recognizable audio. The alternative would be to scale the desired rate by 2x, 3x, etc until it's above the bsinc limit, then take every 2nd, 3rd, etc sample of the result as if by an extra simpler resampler pass.
* Use a more appropriate epsilon for Sinc()Chris Robinson2021-02-241-1/+2
|
* Avoid an unnecessary loop iterationChris Robinson2021-02-231-2/+3
|
* Adjust the bsinc filter table packingChris Robinson2021-02-234-41/+29
| | | | | | | | Now each scale's filter and phase delta are interleaved for each phase index, followed by the scale and scale+phase delta for each phase index. This ensures no holes in the filter coefficients for the fast bsinc resampler for a given run, while keeping the scale deltas in the same vicinity for the non-fast bsinc resampler.
* Remove unnecessary use of SSE2 intrinsicsChris Robinson2021-02-211-2/+1
| | | | | The compiler is producing the same results either way, since the upper bit results are never used.