aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
Commit message (Collapse)AuthorAgeFilesLines
* Fix building without C11Chris Robinson2017-03-101-1/+2
|
* Implement NFC filters for Ambisonic renderingChris Robinson2017-03-104-76/+235
| | | | | | | | | | | | | | NFC filters currently only work when rendering to ambisonic buffers, which includes HQ rendering and ambisonic output. There are two new config options: 'decoder/nfc' (default on) enables or disables use of NFC filters globally, and 'decoder/nfc-ref-delay' (default 0) specifies the reference delay parameter for NFC-HOA rendering with ambisonic output (a value of 0 disables NFC). Currently, NFC filters rely on having an appropriate value set for AL_METERS_PER_UNIT to get the correct scaling. HQ rendering uses the averaged speaker distances as a control/reference, and currently doesn't correct for individual speaker distances (if the speakers are all equidistant, this is fine, otherwise per-speaker correction should be done as well).
* Add an NFC filter implementationChris Robinson2017-03-092-0/+459
|
* Remove an unnecessary variableChris Robinson2017-03-091-2/+1
|
* Remove unnecessary atomic membersChris Robinson2017-03-081-109/+86
|
* Store the channel count and sample size in the voiceChris Robinson2017-03-071-2/+2
|
* Don't modify the source state in the mixerChris Robinson2017-03-071-1/+0
|
* Make the voice's source pointer atomicChris Robinson2017-03-052-7/+7
|
* Add a boolean to specify if a voice should be playingChris Robinson2017-03-021-10/+9
|
* Increment MixCount in UpdateClockBaseChris Robinson2017-02-281-1/+4
| | | | This is to protect clocktime reads since the backend lock won't protect it.
* Dynamically allocate the channel delay buffersChris Robinson2017-02-283-6/+64
|
* Remove an unneeded functionChris Robinson2017-02-283-24/+7
|
* Start a ALC_SOFT_loopback2 extensionChris Robinson2017-02-281-50/+190
| | | | | | | | | | | | | | | | | | | | | | This extends the base ALC_SOFT_loopback extension with support for B-Format. When ALC_FORMAT_CHANNELS_SOFT is set to ALC_BFORMAT3D_SOFT, then additional attributes must be specified. ALC_AMBISONIC_LAYOUT_SOFT must be set to ALC_ACN_SOFT or ALC_FUMA_SOFT for the desired channel layout, ALC_AMBISONIC_SCALING_SOFT must be set to ALC_N3D_SOFT, ALC_SN3D_SOFT, or ALC_FUMA_SOFT for the desired channel scaling/normalization scheme, and ALC_AMBISONIC_ORDER_SOFT must be set to an integer value greater than 0 for the ambisonic order (maximum allowed is implementation-dependent). Note that the number of channels required for ALC_BFORMAT3D_SOFT is dependent on the ambisonic order. The number of channels can be calculated by: num_channels = (order+1) * (order+1); /* or pow(order+1, 2); */ In addition, a new alcIsAmbisonicFormatSupportedSOFT function allows apps to determine which layout/scaling/order combinations are supported by the loopback device. For example, alcIsAmbisonicFormatSupported(device, ALC_ACN_SOFT, ALC_SN3D_SOFT, 2) will check if 2nd order AmbiX (ACN layout and SN3D scaling) rendering is supported for ALC_BFORMAT3D_SOFT output.
* Use a variable counter for an array size limitChris Robinson2017-02-281-21/+13
|
* Don't use the mutex in the base getClockLatency implementationChris Robinson2017-02-281-3/+8
|
* Print WARNs when a device or context error is generatedChris Robinson2017-02-271-0/+1
|
* Use separate enums for the ambisonic channel order and normalizationChris Robinson2017-02-273-11/+24
|
* Move the current buffer queue entry and play position to the voiceChris Robinson2017-02-273-25/+24
| | | | | | | | | | | | | | This has a couple behavioral changes. First and biggest is that querying AL_BUFFERS_PROCESSED from a source will always return all buffers processed when in an AL_STOPPED state. Previously all buffers would be set as processed when first becoming stopped, but newly queued buffers would *not* be indicated as processed. That old behavior was not compliant with the spec, which unequivocally states "On a source in the AL_STOPPED state, all buffers are processed." Secondly, querying AL_BUFFER on an AL_STREAMING source will now always return 0. Previously it would return the current "active" buffer in the queue, but there's no basis for that in the spec.
* Ensure a non-playing or -paused source does not use a mixing voiceChris Robinson2017-02-252-2/+6
|
* Remove an unused functionChris Robinson2017-02-232-6/+0
|
* Remove CalcXYZCoeffs and inline CalcAngleCoeffsChris Robinson2017-02-235-21/+13
|
* Alter how panpot/pair-wise panning worksChris Robinson2017-02-232-32/+22
| | | | | | | | | | | | | | | | | | | This change allows pair-wise panning to mostly go through the normal ambisonic panning methods, with one special-case. First, a term is added to the stereo decoder matrix's X coefficient so that a centered sound is reduced by -3dB on each output channel. Panning in front creates a similar gain response to the typical L = sqrt(1-pan) R = sqrt(pan) for pan = [0,1]. Panning behind the listener can reduce (up to) an additional -10dB, creating a audible difference between front and back sounds as if simulating head obstruction. Secondly, as a special-case, the source positions are warped when calculating the ambisonic coefficients so that full left panning is reached at -30 degrees and full right at +30 degrees. This is to retain the expected 60-degree stereo width. This warping does not apply to B-Format buffer input, although it otherwise has the same gain responses.
* Rename stereo-panning option to stereo-encodingChris Robinson2017-02-222-11/+11
| | | | Also rename the 'paired' value to 'panpot', and make it the default.
* Limit filter gains to -24dBChris Robinson2017-02-224-39/+33
|
* Reduce the default period count to 3Chris Robinson2017-02-221-1/+1
|
* Don't remove a period from the OSS bufferChris Robinson2017-02-221-11/+4
| | | | | Since we're now waiting for space to be available before mixing, the mixing buffer isn't adding another period.
* Fix OpenSL latency calculationChris Robinson2017-02-221-2/+2
|
* Reduce some codeChris Robinson2017-02-211-61/+33
|
* Make the "sends" config option act as a limitChris Robinson2017-02-211-8/+16
| | | | | Instead of forcing the device to always use the specified send count, it simply limits requests to it.
* Increase the default effect slot and send countChris Robinson2017-02-211-13/+15
| | | | | | | | | | The default number of auxiliary effect slots is now 64. This can still be raised by the config file without a hard maximum, but incurs processing cost for each effect slot generated by the app. The default number of source sends is now actually 2, as per the EFX docs. However, it can be raised up to 16 via ALC_MAX_AUXILIARY_SENDS attribute requests, rather than the previous 4.
* Dynamically allocate the ALsource Send[] arrayChris Robinson2017-02-212-45/+59
|
* Interleave the voice and source property objectsChris Robinson2017-02-211-13/+12
|
* Make the voices' Send[] array dynamically sizedChris Robinson2017-02-212-23/+39
| | | | | The voices are still all allocated in one chunk to avoid memory fragmentation. But they're accessed as an array of pointers since the size isn't static.
* Print warnings about missing libraries and functionsChris Robinson2017-02-213-2/+24
|
* Avoid duplicating device buffer layout logicChris Robinson2017-02-203-38/+38
|
* Remove an unused flag enumChris Robinson2017-02-201-3/+0
|
* Allow distance compensation for non-HQ rendering as wellChris Robinson2017-02-201-37/+44
| | | | | It still requires a custom configuration to specify appropriate speaker distances.
* Remove the separate surround51rear decoder optionChris Robinson2017-02-191-2/+2
| | | | | | Both 5.1 Side and Rear configurations use 'surround51' to look up the appropriate decoder file. The decoder loader already handles mapping between rear and side channels, so there's no need for separate options.
* Apply distance compensation when writing to the outputChris Robinson2017-02-194-122/+94
|
* Don't use periphonic FOA when the HOA decoder is not periphonicChris Robinson2017-02-195-41/+55
|
* Remove the sinc8 resampler optionChris Robinson2017-02-196-286/+26
| | | | | Perf shows less than 1 percent CPU difference from the higher quality bsinc resampler, but uses almost twice as much memory (a 128KB lookup table).
* Always lock the device backend before calling aluMixDataChris Robinson2017-02-1811-50/+63
|
* Return some device latency by defaultChris Robinson2017-02-181-2/+7
| | | | | | | A device will never have 0 latency. OpenAL Soft itself uses a sample buffer length of UpdateSize*NumUpdates, and during playback will have about (NumUpdates-1) periods filled, more or less. Without a more accurate measurement from the playback system, this is better than reporting 0.
* Use select() to wait for audio with OSS and SolarisChris Robinson2017-02-182-85/+137
|
* Reorganize ALvoice membersChris Robinson2017-02-152-88/+95
| | | | | This places the Send[] array at the end of the struct, making it easier to handle dynamically.
* Make ALsourceProps' Send array dynamically sizedChris Robinson2017-02-143-20/+102
| | | | | | ALsourceProps' Send[] array is placed at the end of the struct, and given an indeterminate size. Extra space is allocated at the end of each struct given the number of auxiliary sends set for the device.
* Make the source state atomicChris Robinson2017-02-133-7/+8
| | | | | Since it's modified by the mixer when playback is ended, a plain struct member isn't safe.
* Put BsincState in a generic unionChris Robinson2017-02-139-75/+75
|
* Porperly check for and use __builtin_assume_alignedChris Robinson2017-02-132-12/+20
|
* Clean up the bsinc mixer a bitChris Robinson2017-02-123-26/+28
|