aboutsummaryrefslogtreecommitdiffstats
path: root/core/voice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Track the callback buffer base separatelyChris Robinson2023-02-181-8/+5
| | | | | Instead of recalculating it all the time, even for sources that don't use callback buffers.
* Decode IMA4 blocks with fewer loopsChris Robinson2023-02-161-35/+30
| | | | | Rather than decoding samples in chunks of 8, calculate the read offset from an incrementing index.
* Combine and simplify some loopsChris Robinson2023-02-151-24/+14
|
* Skip ADPCM samples in a separate loop before writingChris Robinson2023-02-151-59/+83
|
* Rename some variables for clarityChris Robinson2023-02-151-19/+19
|
* Add comments describing the MSADPCM decodeChris Robinson2023-02-141-0/+13
|
* Fix write offset for loading FmtIMA4 samplesChris Robinson2023-02-141-2/+2
|
* Support MSADPCM samples in the mixerChris Robinson2023-02-141-0/+106
|
* Support IMA4 ADPCM as a mixing voice formatChris Robinson2023-02-141-30/+145
|
* Pass a boolean for the decoder to update its stateChris Robinson2023-02-131-1/+1
|
* Explicitly cast a constexpr value to passify MSVCChris Robinson2023-02-121-3/+3
|
* Use to_address to pass a pointer-like iterator as a real pointerChris Robinson2023-02-121-4/+5
|
* Separate decoding and mixing from resamplingChris Robinson2023-02-121-283/+301
|
* Always write samples to the destination when resamplingChris Robinson2023-02-111-4/+9
|
* Check for the voice being beyond the loop end point earlierChris Robinson2023-02-111-5/+11
|
* Change the default resampler to cubicChris Robinson2023-01-271-1/+1
| | | | | This has notably better quality than linear, while still being faster than bsinc.
* Add and use mixers that process one input and output channelChris Robinson2023-01-051-0/+14
|
* Add a simple wrapper to call the mixer functionChris Robinson2023-01-041-2/+2
|
* Handle negative offset starts for callback buffersChris Robinson2023-01-041-9/+11
|
* Fix a commentChris Robinson2023-01-011-2/+1
|
* Swap the order of some checks to simplify voice setupChris Robinson2023-01-011-35/+25
|
* Use a bitset for the enabled event flagsChris Robinson2022-12-161-3/+3
|
* Limit voice update fading length to 64 samplesChris Robinson2022-12-081-13/+7
|
* Avoid using a macro to wrap standard attributesChris Robinson2022-12-061-11/+11
|
* Avoid some uses of the LIKELY/UNLIKELY macrosChris Robinson2022-12-051-2/+2
|
* Use standard likely/unlikely attributes when availableChris Robinson2022-12-051-13/+13
|
* Add the ability to start a voice at a particular timeChris Robinson2022-11-031-7/+37
|
* Handle negative voice positionsChris Robinson2022-11-021-27/+49
| | | | | | This allows a voice/source to start with a delay, more accurately than simply waiting to call alSourcePlay. The delay is affected by pitch and velocity, making it useful to simulate distant sounds that take time to be heard.
* Rename some variables to more clearly indicate their meaningChris Robinson2022-10-281-6/+6
|
* Rename some variables to be less ambiguousChris Robinson2022-10-211-8/+8
|
* Add separate filter options for UHJ encoding and decodingChris Robinson2022-10-211-2/+2
|
* Add an IIR filter option for UHJ encoding/decodingChris Robinson2022-10-211-23/+30
| | | | | | This uses the reversed-allpass trick to maintain linear phase. with a 256- sample look-ahead/delay to minimize distortion. This should better preserve low frequencies while maintaining a proper phase response.
* Remove an unused variableChris Robinson2022-09-201-10/+9
|
* Clear the buffer loop element when out of the loop rangeChris Robinson2022-09-181-2/+3
|
* Track if doing 2D mixing onlyChris Robinson2022-09-041-2/+3
| | | | And use it to select the proper HF scales
* Allow different HF scales for 2D mixing/outputChris Robinson2022-09-041-1/+1
| | | | | Not actually used yet, the device needs to track whether it's using 2D or 3D mixing.
* Use the difference in HF scale for upsampling ambisonicsChris Robinson2022-09-031-1/+1
|
* Revert "Don't apply the HF scaling for "upsampling" ambisonics"Chris Robinson2022-09-021-12/+44
| | | | This reverts commit bf3f63fb4c5faa45784d7433d68b7013e29ee2c1.
* Don't apply the HF scaling for "upsampling" ambisonicsChris Robinson2022-08-311-44/+12
| | | | | | | | | | | | Not sure if this is best, but it fixes the issue of upsampling lower orders to higher orders multiple times (mixing lower order to higher order, cutting back to lower order by dropping the extra channels, then upsampling again, applying the HF scale multiple times and messing up the high frequencies/energy vector), as well as having too-strong high frequencies of upsampled content in general. As it is, with the new upsampling method, the lower order signal contributes to some higher order channels, which helps offset the high frequency scaling difference (except first- to second-order, which adds nothing).
* Create and use 2D upsampling matricesChris Robinson2022-08-251-4/+6
|
* Inline a function and remove an unnecessary parameterChris Robinson2022-08-161-1/+1
|
* Add an option for higher quality UHJ filtersChris Robinson2022-08-081-4/+20
|
* Parameterize the UHJ filter lengthChris Robinson2022-08-071-10/+10
|
* Use a proper literal typeChris Robinson2022-06-071-1/+1
|
* Use a member variable to specify the decoder paddingChris Robinson2022-05-171-2/+10
|
* Avoid magic numbersChris Robinson2022-05-161-6/+6
|
* Use virtual functions for the decoderChris Robinson2022-05-141-10/+5
|
* Rename lerp to avoid conflicts with C++20's std::lerpChris Robinson2022-04-061-2/+2
|
* Remove the reversed all-pass trick in MixDirectHrtfBaseChris Robinson2022-03-301-4/+1
| | | | Given the minimum phase HRTF, it's not going to stay linear phase anyway.
* Slightly improve handling of stopping voicesChris Robinson2022-01-081-19/+27
|