Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use an ambisonics-based panning method | Chris Robinson | 2014-09-30 | 1 | -115/+110 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For mono sources, third-order ambisonics is utilized to generate panning gains. The general idea is that a panned mono sound can be encoded into b-format ambisonics as: w[i] = sample[i] * 0.7071; x[i] = sample[i] * dir[0]; y[i] = sample[i] * dir[1]; ... and subsequently rendered using: output[chan][i] = w[i] * w_coeffs[chan] + x[i] * x_coeffs[chan] + y[i] * y_coeffs[chan] + ...; By reordering the math, channel gains can be generated by doing: gain[chan] = 0.7071 * w_coeffs[chan] + dir[0] * x_coeffs[chan] + dir[1] * y_coeffs[chan] + ...; which then get applied as normal: output[chan][i] = sample[i] * gain[chan]; One of the reasons to use ambisonics for panning is that it provides arguably better reproduction for sounds emanating from between two speakers. As well, this makes it easier to pan in all 3 dimensions, with for instance a "3D7.1" or 8-channel cube speaker configuration by simply providing the necessary coefficients (this will need some work since some methods still use angle-based panpot, particularly multi-channel sources). Unfortunately, the math to reliably generate the coefficients for a given speaker configuration is too costly to do at run-time. They have to be pre- generated based on a pre-specified speaker arangement, which means the config options for tweaking speaker angles are no longer supportable. Eventually I hope to provide config options for custom coefficients, which can either be generated and written in manually, or via alsoft-config from user-specified speaker positions. The current default set of coefficients were generated using the MATLAB scripts (compatible with GNU Octave) from the excellent Ambisonic Decoder Toolbox, at https://bitbucket.org/ambidecodertoolbox/adt/ | ||||
* | Combine some fields into a struct | Chris Robinson | 2014-09-10 | 1 | -119/+114 |
| | |||||
* | Update COPYING to the latest ↵ | François Cami | 2014-08-18 | 1 | -2/+2 |
| | | | | https://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt to fix the FSF' address Fix the FSF' address in the source | ||||
* | Use C99 inline in more places | Chris Robinson | 2013-11-04 | 1 | -0/+2 |
| | |||||
* | Use a helper macro for pi*2 | Chris Robinson | 2013-10-08 | 1 | -13/+13 |
| | |||||
* | Use helper macros to convert between degrees and radians | Chris Robinson | 2013-10-08 | 1 | -31/+31 |
| | |||||
* | Use helpers to set channel gain arrays | Chris Robinson | 2013-10-03 | 1 | -7/+5 |
| | | | | Also avoid unnecessary clearing. | ||||
* | Silence some clang warnings | Chris Robinson | 2013-06-05 | 1 | -3/+3 |
| | |||||
* | Use a more efficient method to offset the speaker angles when computing gains | Chris Robinson | 2012-08-09 | 1 | -29/+35 |
| | |||||
* | Use wrappers for float-typed math functions | Chris Robinson | 2012-06-29 | 1 | -6/+6 |
| | |||||
* | Don't use all caps for enum value names | Chris Robinson | 2012-06-28 | 1 | -43/+43 |
| | |||||
* | Use ComputeAngleGains for multi-channel sources and remove the unused lookup ↵ | Chris Robinson | 2012-04-29 | 1 | -69/+1 |
| | | | | table stuff | ||||
* | Fix a couple comment typos, and a minor cleanup | Chris Robinson | 2012-04-29 | 1 | -12/+6 |
| | |||||
* | Fix ComputeAngleGains | Chris Robinson | 2012-04-28 | 1 | -61/+99 |
| | | | | | | The old code would improperly handle speakers just inside or outside the coverage area if it had to be inverted. It also didn't properly handle when only one speaker was outside of the covered area. | ||||
* | Add a method to calculate gains given a sound point and its half-width, and ↵ | Chris Robinson | 2012-04-28 | 1 | -0/+161 |
| | | | | | | | | | use it for reverb The half-width ranges from 0 to pi, and essentially specifies the coverage area around the listener. At 0, it's an infinitely small point sound and behaves like a usual panning sound. At pi/2 it covers half the area, and at pi it covers the whole area. | ||||
* | Flip the parameters to aluCart2LUTpos, so it behaves a bit more like atan2 | Chris Robinson | 2012-04-28 | 1 | -2/+2 |
| | |||||
* | Store the speaker angles in the device | Chris Robinson | 2012-04-27 | 1 | -1/+2 |
| | |||||
* | Revert the default stereo layout back to -90 and +90 degrees | Chris Robinson | 2012-03-12 | 1 | -2/+2 |
| | | | | | For the time being, until better stereo spatialization can be implemented and headphones can be better detected. | ||||
* | Update the layout config option names | Chris Robinson | 2012-03-01 | 1 | -6/+6 |
| | |||||
* | Use an enum for the device type | Chris Robinson | 2012-02-23 | 1 | -1/+1 |
| | |||||
* | Always use the default speaker layout for loopback devices | Chris Robinson | 2012-02-07 | 1 | -6/+10 |
| | |||||
* | Change the default stereo speaker positions to match the stereo channel ↵ | Chris Robinson | 2012-02-04 | 1 | -2/+2 |
| | | | | | | | | | positions A separate "headphones" configuration may be nice to add for -90,+90, however not many audio APIs can detect this. Ideally HRTF would be used with headphones too, which largely ignores the speaker positions, however there could be situations where this is unfeasible or unwanted. | ||||
* | Use the square root to build the panning table instead of sin/cos | Chris Robinson | 2011-10-10 | 1 | -8/+8 |
| | |||||
* | Use macros for float-typed PI values, to avoid manual casts everywhere | Chris Robinson | 2011-09-22 | 1 | -39/+39 |
| | |||||
* | More MSVC precision casts | Chris Robinson | 2011-09-22 | 1 | -40/+40 |
| | |||||
* | Use cosf and sinf when available | Chris Robinson | 2011-09-22 | 1 | -4/+4 |
| | | | | Also clear away a few more MSVC precision warnings | ||||
* | Add a ConfigValueStr function, to return the string through a parameter | Chris Robinson | 2011-09-19 | 1 | -8/+6 |
| | |||||
* | Print an error for invalid speaker layout keys | Chris Robinson | 2011-08-28 | 1 | -0/+3 |
| | |||||
* | Rename the ERROR macro to ERR | Chris Robinson | 2011-07-13 | 1 | -2/+2 |
| | |||||
* | Replace some AL_PRINT calls with proper logging | Chris Robinson | 2011-07-10 | 1 | -2/+2 |
| | |||||
* | Get rid of a couple typedefs | Chris Robinson | 2011-07-02 | 1 | -4/+4 |
| | |||||
* | Add a 5.1 device format that uses side channels instead of back | Chris Robinson | 2011-05-28 | 1 | -0/+15 |
| | |||||
* | Use a multi-dimensional array for the panning LUT | Chris Robinson | 2011-05-21 | 1 | -10/+9 |
| | |||||
* | Remove the device channel matrix | Chris Robinson | 2011-05-06 | 1 | -71/+1 |
| | |||||
* | Fix LFE channel output | Chris Robinson | 2011-04-14 | 1 | -0/+3 |
| | |||||
* | Only set relevant device matrix entries | Chris Robinson | 2011-04-12 | 1 | -30/+35 |
| | |||||
* | Invert the device matrix row/column | Chris Robinson | 2011-03-13 | 1 | -37/+37 |
| | | | | It is accessed now as mat[target][source] | ||||
* | Re-enable channel-config-specific layout options | Chris Robinson | 2011-01-23 | 1 | -5/+8 |
| | |||||
* | Separate device format into 'channel config' and 'sample type' components | Chris Robinson | 2010-12-04 | 1 | -22/+7 |
| | |||||
* | Rename OUTPUTCHANNELS to something more descriptive | Chris Robinson | 2010-12-01 | 1 | -12/+12 |
| | |||||
* | Uninline some functions | Chris Robinson | 2010-11-28 | 1 | -0/+14 |
| | | | | Also add -Winline to the compiler command line to watch for future inline problems | ||||
* | Duplicate stereo sources by default | Chris Robinson | 2010-09-22 | 1 | -1/+0 |
| | | | | | The mixer is smart enough now to handle proper volume adjustments depending on the number of output speakers | ||||
* | Panning init cleanup | Chris Robinson | 2010-08-07 | 1 | -47/+46 |
| | |||||
* | Separate speaker/panning initialization into another source file | Chris Robinson | 2010-08-03 | 1 | -0/+361 |