aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
Commit message (Collapse)AuthorAgeFilesLines
* 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. :)
* Remove duplicated source freeing codeChris Robinson2008-01-181-20/+0
|
* Buffer size fixes. Partially reverts the ALSA buffer size "fix"Chris Robinson2008-01-182-11/+17
|
* Don't dereference ALContext if there's no context yetChris Robinson2008-01-171-2/+2
| | | | Patch by Evgeny A. Marchenko
* Add missing config.h includesChris Robinson2008-01-167-2/+14
|
* Don't include alAuxEffectSlot.h in alSource.hChris Robinson2008-01-162-0/+2
|
* Make sure sources are deleted with the contextChris 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
* Store effect slots in the contextChris Robinson2008-01-151-0/+2
|
* Add support for AL_LOKI_quadriphonicChris Robinson2008-01-142-1/+5
|
* Reduce indentationChris Robinson2008-01-141-6/+4
|
* Add an option for disabling ALSA mmapChris Robinson2008-01-141-1/+9
|
* Avoid busy waiting when waiting for suspend to clearChris Robinson2008-01-141-3/+2
|
* Let the mmap thread start the pcm stream when it's fullChris Robinson2008-01-141-52/+0
| | | | Instead of filling it with silence and starting it before the thread is active
* Make sure the stream is playing when it's fullChris Robinson2008-01-141-0/+13
|
* Don't restart the stream right after preparing itChris Robinson2008-01-141-4/+0
| | | | It needs to be filled, first
* Don't attempt to recover the ALSA stream when filling silenceChris Robinson2008-01-141-13/+4
| | | | Since it was just prepared, any error would likely mean bigger problems
* Close dangling devices when exitingChris Robinson2008-01-141-0/+22
|
* Destroy context if closing a device with oneChris Robinson2008-01-141-0/+2
|
* Keep track of open devicesChris Robinson2008-01-141-0/+39
|
* Reorder setting of some variablesChris Robinson2008-01-121-8/+9
|
* Merge branch 'master' into efx-experimentChris Robinson2008-01-116-143/+483
|\
| * Don't limit output wave filename sizeChris Robinson2008-01-111-3/+2
| |
| * Fix the Wave Writer's reliance on ftellChris Robinson2008-01-111-2/+3
| | | | | | | | So output can work on FIFOs
| * Use Sleep instead of usleepChris Robinson2008-01-112-6/+6
| |
| * Don't double-close a handle on errorChris Robinson2008-01-111-1/+0
| |
| * Don't attempt to open ALSA playback/capture if it didn't loadChris Robinson2008-01-111-1/+7
| |
| * Add a wave file writing backendChris Robinson2008-01-112-0/+337
| |
| * Allow querying of ALC_MONO_SOURCES and ALC_STEREO_SOURCESChris Robinson2008-01-101-0/+18
| | | | | | | | Based on a patch by Xavier Bouchoux
| * Use a more reliable thread loop for DSound, instead of a Win32 timerChris Robinson2008-01-081-68/+64
| | | | | | | | Also use a simpler method for calculating the read/write location
| * Remove unneeded silence fieldChris Robinson2008-01-071-5/+0
| |
| * Fix lone ALC_REFRESH query caseChris Robinson2008-01-061-1/+1
| |
| * Don't allow 0 periodsChris Robinson2008-01-061-1/+1
| |
| * ALC_REFRESH is the number of updates per secondChris Robinson2008-01-064-5/+5
| |
| * Make OSS's update size dynamicChris Robinson2008-01-061-17/+21
| |
| * Fix the buffer size so ALSA doesn't multiply by the number of periodsChris Robinson2008-01-061-4/+6
| |
| * Some non-mmap ALSA fixesChris Robinson2008-01-051-40/+21
| |
| * 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-043-27/+328
|\|
| * Use 6 point spatialization for 6.1 and 7.1 outputChris Robinson2008-01-041-11/+38
| |
| * Implement a crossfeed config optionChris Robinson2008-01-031-0/+14
| |
| * Add the Bauer stereophonic-to-binaural DSP (bs2b) code and hooksChris Robinson2008-01-032-8/+242
| |
* | Merge branch 'master' into efx-experimentChris Robinson2008-01-012-60/+33
|\|
| * Fail if OSS can't set the requested bit depth and channel countChris Robinson2008-01-011-38/+9
| |
| * Fix channel ordering for multichannel buffersChris Robinson2008-01-011-22/+24
| |