aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
Commit message (Collapse)AuthorAgeFilesLines
* Include float.h if it exists, for _RC_CHOP and _MCW_RCChris Robinson2008-10-141-0/+4
|
* Remove another unused source memberChris Robinson2008-10-101-1/+0
|
* Use a modulo to keep the buffer position in range for looping sourcesChris Robinson2008-10-101-1/+4
| | | | | A high pitch and low buffer size can cause a lot of unnecessary iterations otherwise, that just decrement the position
* Clamp source position to the buffer size when it stopsChris Robinson2008-10-091-0/+2
|
* Remove unneeded source member variableChris Robinson2008-10-091-1/+0
|
* Only send one channel through the wet pathChris Robinson2008-10-091-149/+106
|
* Increase max pitch to 65536Chris Robinson2008-10-091-4/+4
| | | | This should be safe now
* Simplify the lerp functionChris Robinson2008-10-091-1/+1
|
* Don't apply the wet path for multi-channel buffersChris Robinson2008-10-091-10/+0
|
* Skip mixing if the read position is beyond the end of the bufferChris Robinson2008-10-091-3/+8
|
* The wet path should be silent if no effect is set on the slotChris Robinson2008-10-091-1/+2
|
* Don't hold the whole-number position in the fractional valueChris Robinson2008-10-021-24/+19
| | | | This will help prevent overflows when the max pitch is increased
* Use a new low-pass filter, based on the I3DL2 specChris Robinson2008-10-021-47/+40
| | | | Many thanks to Christopher Fitzgerald, for helping with it
* Air absorption factor is applied to the dB value, not linear gainChris Robinson2008-09-221-13/+15
|
* Fixup some source parameter calculationsChris Robinson2008-09-161-28/+49
|
* Use a 12dB/oct rolloff instead of 24 for the lowpass filterChris Robinson2008-09-131-14/+10
|
* Clear the end of the buffer when at the end of the queue and not loopingChris Robinson2008-09-061-0/+2
|
* Remove unneeded source struct memberChris Robinson2008-08-151-4/+1
|
* Overwrite the input wet sample with the outputChris Robinson2008-08-141-6/+6
|
* Ramp channel gains to remove pops and clicks from abrupt changesChris Robinson2008-08-141-20/+52
| | | | Thanks to Christopher Fitzgerald for helping me work on it
* Set FPU mode to round toward zero for mixingChris Robinson2008-08-081-0/+17
|
* Remove unnecessary castingChris Robinson2008-08-081-8/+16
|
* Prevent a 0 or negative increment for the buffer positionChris Robinson2008-08-051-0/+2
| | | | Thanks to Christopher Fitzgerald for pointing these last two problems out
* Fix some calculations for the reverb bufferChris Robinson2008-07-261-25/+22
|
* Make the filter processing function inlineChris Robinson2008-07-261-0/+36
|
* Implement yet another low-pass filterChris Robinson2008-07-251-16/+9
| | | | This one using the Butterworth IIR filter design
* Specify padding per buffer, and make sure it's large enough for the filter stepChris Robinson2008-07-241-5/+5
|
* Don't advertise extra samples for mixingChris Robinson2008-07-231-3/+2
|
* Implement an alternative low-pass filterChris Robinson2008-07-231-36/+32
| | | | | | | | | This method samples from the buffer so that it gets a time-correct 5khz stream, which is subtracted from the original sample and has the high-frequency gain applied, then added back. A better method may be to average all the samples from the current one to the one freq/5000 away, instead of bilinear filtering the two nearest freq/5000 apart. Processing cost will need to determine its viability
* Implement doppler factor source propertyChris Robinson2008-07-151-1/+1
|
* Add the reverb room rolloff to the source room rolloff, not overrideChris Robinson2008-07-151-1/+1
|
* Reduce the mix buffer sizes by halfChris Robinson2008-07-081-1/+1
| | | | Nearly 3MB is a bit much. Could reduce it further, but this is good enough for now.
* Leave SourceToListener untransformed for use with untransformed velocitiesChris Robinson2008-07-031-6/+16
| | | | | Distance is also left untransformed so cone calculations with SoundToListener are correct
* Fix source calculations for AL_SOURCE_RELATIVE modeChris Robinson2008-05-181-18/+22
| | | | | | Make sure the source position and direction are properly put into listener- space before working with them, and don't calculate the listener velocity for relative coordinates
* Check the right struct member for the filter typeChris Robinson2008-04-121-2/+2
|
* Fast float-to-int function is no longer neededChris Robinson2008-02-081-14/+2
|
* Remove unnecessary castingChris Robinson2008-02-081-2/+2
|
* Add an option for duplicating stereo sources on the back speakersChris Robinson2008-02-061-6/+17
|
* Use the correct channel ordering for WindowsChris Robinson2008-01-271-0/+40
|
* 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
|