aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix output channel order for 6.1 and 7.1Chris Robinson2008-01-271-22/+22
|
* Remove an unneceesary pointer check and decrease indentationChris Robinson2008-01-211-424/+421
|
* Remove unnecessary duplicate thunk lookupsChris Robinson2008-01-211-10/+8
|
* Small formatting updatesChris Robinson2008-01-201-1/+3
|
* Remove duplicate functionChris Robinson2008-01-201-23/+7
|
* Don't access ALSource for every sample mixChris Robinson2008-01-201-21/+24
|
* Remove some unnecessary duplicate math, which was making long linesChris Robinson2008-01-191-67/+56
|
* Remove some branchesChris Robinson2008-01-181-75/+25
|
* Implement AL_EFFECT_REVERBChris Robinson2008-01-181-19/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is a quick description of how the reverb effect works: +--->---+*(4) | V new sample +-----+---+---+ | |extra|ltr|ref| <- +*(1) +-----+---+---+ (3,5)*| |*(2) +-->| V out sample 1) Apply master reverb gain to incoming sample and place it at the head of the buffer. The master reverb gainhf was already applied when the source was initially mixed. 2) Copy the delayed reflection sample to an output sample and apply the reflection gain. 3) Apply the late reverb gain to the late reverb sample 4) Copy the end of the buffer, applying a decay gain and the decay hf ratio, and add to the late reverb. 5) Copy the late reverb sample, adding to the output sample. Then the head and sampling points are shifted forward, and done again for each new sample. The extra buffer length is determined by the Reverb Density property. A value of 0 gives a length of 0.1 seconds (long, with fairly distinct echos) , and 1 gives 0.075 seconds (short, indistinct echos). The decay gain is calculated such that after a number of loops to satisfy the Decay Time, a sample will be 1/32768th as powerful (virtually insignificant to the resulting output, and only getting further reduced). It is calculated as: DecayGain = pow(1.0f/32768.0f, 1.0/(DecayTime/ExtraLength)); Things to note: Reverb Diffusion is not currently handled, nor is Decay HF Limit. Decay HF Ratios above 1 probably give incorrect results. Also, this method likely sucks, but it's the best I can come up with before release. :)
* Don't dereference ALContext if there's no context yetChris Robinson2008-01-171-2/+2
| | | | Patch by Evgeny A. Marchenko
* Don't include alAuxEffectSlot.h in alSource.hChris Robinson2008-01-161-0/+1
|
* Don't clamp wet gain if there's no send slot, and move slot gain calculationChris Robinson2008-01-161-9/+12
| | | | To remove an extra if check
* Store a reference to the effect slot in a source's send, not a copyChris Robinson2008-01-161-11/+13
|
* Remove unneeded variablesChris Robinson2008-01-151-38/+28
|
* Use acosf when availableChris Robinson2008-01-151-1/+8
|
* Use the previous low-pass filter again, as it seems to match the intended ↵Chris Robinson2008-01-151-6/+14
| | | | output better
* Add support for AL_LOKI_quadriphonicChris Robinson2008-01-141-0/+4
|
* Reorder setting of some variablesChris Robinson2008-01-121-8/+9
|
* Merge branch 'master' into efx-experimentChris Robinson2008-01-111-0/+2
|\
| * Disable fast float-to-int hack.Chris Robinson2008-01-051-0/+2
| | | | | | | | | | Even with precautions, it's giving problems. Not worth it since I don't quite understand how it works, or know if there's even a benefit.
* | Try a different low-pass filterChris Robinson2008-01-051-4/+6
| | | | | | | | | | Seems to be more correct, although it's not as powerful as the previous (which may be a good thing)
* | Merge branch 'master' into efx-experimentChris Robinson2008-01-041-27/+113
|\|
| * Use 6 point spatialization for 6.1 and 7.1 outputChris Robinson2008-01-041-11/+38
| |
| * Add the Bauer stereophonic-to-binaural DSP (bs2b) code and hooksChris Robinson2008-01-031-8/+41
| |
* | Merge branch 'master' into efx-experimentChris Robinson2008-01-011-22/+24
|\|
| * Fix channel ordering for multichannel buffersChris Robinson2008-01-011-22/+24
| |
* | Fix wet volumes for multichannel pathChris Robinson2007-12-311-0/+11
| |
* | Merge branch 'master' into efx-experimentChris Robinson2007-12-311-78/+282
|\|
| * Add paths for 4 to 7.1 channel buffer mixingChris Robinson2007-12-311-8/+45
| |
| * Disable unnecessary calculationsChris Robinson2007-12-311-0/+4
| |
| * Allow psuedo 6.1 and 7.1 outputChris Robinson2007-12-311-2/+96
| | | | | | | | | | | | This only does spatial calculations on the 4 corner speakers, but it's necessary groundwork for AL_EXT_MCFORMATS support. Spatial calculations for 6 speakers can be added later.
| * Use an enum list for dealing with channelsChris Robinson2007-12-311-67/+79
| | | | | | | | This will make it easier to remap channels, especially the center and lfe channels
| * Make some defines local to ALu.cChris Robinson2007-12-311-0/+6
| |
| * Fix includes so alMain.h doesn't include so much by itselfChris Robinson2007-12-311-0/+4
| |
| * Don't default to AL_FORMAT_STEREO16 when writing to the output bufferChris Robinson2007-12-311-1/+3
| |
| * Loop per frame, not per sample, when writing the output bufferChris Robinson2007-12-311-20/+38
| |
| * Implement AL_EXT_FLOAT32Chris Robinson2007-12-281-0/+6
| |
| * Don't check explicitly against formats, but rather their byte/channel countChris Robinson2007-12-261-9/+5
| |
| * Allow 5.1 channel outputChris Robinson2007-12-261-2/+29
| | | | | | | | This doesn't use the center or LFE channel in spatial calculations, however
* | Zero out wet send params when calculating source paramsChris Robinson2007-12-311-38/+62
| | | | | | | | Instead of using a check in the mix loop
* | Use the right-channel sample...Chris Robinson2007-12-211-2/+2
| |
* | Don't send stereo samples to the wet path without an auxiliary slotChris Robinson2007-12-211-6/+13
| |
* | Fix extrenuous commentChris Robinson2007-12-211-4/+2
| |
* | Merge branch 'master' into efx-experimentChris Robinson2007-12-201-15/+13
|\|
| * Do the channel pannings based on output channel countChris Robinson2007-12-201-14/+10
| | | | | | | | This should make it a bit easier to extend in the future
* | Use the AuxSendAuto property of the effect slotChris Robinson2007-12-181-1/+3
| |
* | Implement AL_AUXILIARY_SEND_FILTER_GAIN_AUTO propertyChris Robinson2007-12-181-1/+5
| |
* | Implement AL_ROOM_ROLLOFF_FACTOR propertyChris Robinson2007-12-181-1/+14
| |
* | Fix initial WetMix setupChris Robinson2007-12-181-4/+1
| |
* | Implement AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO propertyChris Robinson2007-12-181-3/+9
| |