Chris Robinson
0df5eb90ea
Make sure key and velocity ranges are the first two generators
2013-12-21 15:28:46 -08:00
Chris Robinson
ede3c20880
Free thunk entry in the object destructor
2013-12-20 01:04:38 -08:00
Chris Robinson
5dc3f3626d
Better protect against improper alSoundfontSamplesSOFT calls
2013-12-20 00:50:43 -08:00
Chris Robinson
d596cf9cf3
Use a different autowah filter range
...
Still just guesses, but this seems to avoid math problems with low peak gains.
2013-12-20 00:16:23 -08:00
Chris Robinson
1bd828603e
Add functions to set a soundfont's sample data
2013-12-19 04:19:03 -08:00
Chris Robinson
03a6bf22a5
Fix compiling without FluidSynth
2013-12-19 02:12:01 -08:00
Chris Robinson
99933fac49
Allow creating instrument objects
2013-12-19 00:57:07 -08:00
Chris Robinson
666acb314b
Rename some ALsoundfont fields
2013-12-19 00:37:56 -08:00
Chris Robinson
1b5c3495c9
Add methods to create and destroy presets
2013-12-19 00:09:55 -08:00
Chris Robinson
1e536cf7ca
Properly initialize and cleanup the soundfont map
2013-12-18 23:21:59 -08:00
Chris Robinson
8083fb5be7
Add a new ALsoundfont object type
...
Includes a basic hierarchy for presets, instruments, samples, zones,
generators, and modulators.
2013-12-18 22:51:53 -08:00
Chris Robinson
b9468dc917
Fix header guard and remove duplicate code
2013-12-18 19:17:03 -08:00
Chris Robinson
0653680690
Move the base MidiSynth to a separate file
2013-12-17 23:03:34 -08:00
Chris Robinson
0095a59fc9
Move the dummy MIDI handler to a separate file
2013-12-17 22:43:10 -08:00
Chris Robinson
ee92b3142d
Move FluidSynth to its own file
2013-12-17 22:36:25 -08:00
Chris Robinson
1dd05bac5c
Add a alMidiResetSOFT method to reset the synth
...
Playback is stopped, the queue is flushed, the clock is reset to 0, and the
MIDI system is reset to power-up status.
2013-12-13 14:15:01 -08:00
Chris Robinson
ac525db845
Fix numeric constant type (double->float)
2013-12-08 05:01:06 -08:00
Chris Robinson
a846418964
Rename pthread wrappers used for Windows to althread
2013-12-06 02:12:45 -08:00
Chris Robinson
c834713526
Add methods to set and get the MIDI gain
2013-11-30 23:47:42 -08:00
Chris Robinson
2633fbfc4b
Add a method to check if a file is a soundfont
2013-11-30 20:37:37 -08:00
Chris Robinson
be446366fb
Add a method to specifying MIDI SysEx messages
2013-11-29 05:37:45 -08:00
Chris Robinson
ea1d7d56d3
Add infrastructure for handling SysEx MIDI events
2013-11-29 04:56:33 -08:00
Chris Robinson
f8c68291d3
Add a method to stop MIDI playback
...
Unlike pausing, this resets the MIDI clock time to 0, clears the existing event
queue, stops all MIDI sounds, and resets MIDI controllers.
2013-11-28 04:52:53 -08:00
Chris Robinson
bb0207d784
Add a method to load a soundfont
2013-11-28 03:38:17 -08:00
Chris Robinson
a48f362d28
Start a MIDI interface extension
2013-11-28 01:53:05 -08:00
Chris Robinson
182b08d8bc
Create and use a MidiSynth on playback devices
2013-11-27 18:52:56 -08:00
Chris Robinson
37fa82f138
Use a 64-bit uint for MIDI event times
2013-11-27 04:33:33 -08:00
Chris Robinson
d315feae40
Add a MIDI event queue
...
In preparation for a MIDI extension.
2013-11-27 03:49:26 -08:00
Chris Robinson
08dfbcfd5c
Add min/max/clamp methods for doubles
2013-11-27 00:30:13 -08:00
Chris Robinson
80ea801204
Add a macro for GCC to ensure stack alignment
2013-11-25 17:29:39 -08:00
Chris Robinson
191e8172f0
Use a macro to help condense some repeated code
2013-11-24 18:11:45 -08:00
Chris Robinson
b029b77784
Add some missing 'static's
2013-11-24 17:43:20 -08:00
Chris Robinson
25b9c3d0c1
Apply HRTF coefficient stepping separately
2013-11-10 05:52:22 -08:00
Chris Robinson
4386ee32ce
Use one long buffer for the chorus and flanger delay lines
2013-11-10 02:48:03 -08:00
Chris Robinson
a603dd55ff
Rename lfo_coeff to lfo_scale
2013-11-08 16:54:45 -08:00
Chris Robinson
9228d13333
Use integer modulo for chorus and flanger
...
Also simplify LFO coefficient calculations.
2013-11-08 16:33:42 -08:00
Chris Robinson
bca959f372
Only use the inner loop for the chorus/flanger template method
2013-11-08 05:26:43 -08:00
Chris Robinson
d6eff654be
Redo the autowah effect
...
It's now a low-pass filter with a cutoff that varies according to the input
signal amplitude.
There remains issues with apparent feedback in the resonant frequency with high
resonance values. The actual cutoff range for the filter is also a guess.
2013-11-07 17:46:14 -08:00
Chris Robinson
e0fecdcaaa
Reimplement the compressor to work per-sample
2013-11-06 23:39:41 -08:00
Chris Robinson
10dbb1bc9b
Remove the Lock and Unlock methods from BackendFuncs
...
All backends that still use the old interface use the default locking methods,
which is also used by the ALCbackend base.
2013-11-04 23:34:18 -08:00
Chris Robinson
ca83629e4e
Forward some wrapper functions to the base method
2013-11-04 23:19:30 -08:00
Chris Robinson
d3c70e63b4
Use C99 inline in more places
2013-11-04 13:44:46 -08:00
Chris Robinson
551f893ae9
Use C99 inline semantics
2013-11-04 12:12:31 -08:00
Chris Robinson
692ab1085d
Only set device functions when needed
2013-11-04 10:52:03 -08:00
Chris Robinson
94aeb5f52e
Use a unique backend type for loopback
2013-11-04 10:51:22 -08:00
Chris Robinson
9760a592b2
Rename VCALL and VCALL0 to V and V0
2013-11-02 17:30:28 -07:00
Chris Robinson
f868d881d9
Constify some function pointers
2013-11-02 16:58:26 -07:00
Chris Robinson
3d921e0e6f
Make backend factory methods static as needed
2013-11-02 16:35:05 -07:00
Chris Robinson
a1a3f51be2
Convert the OSS backend to the new interface
2013-11-02 15:42:45 -07:00
Chris Robinson
c851e2c611
Set vtables in the constructor
2013-11-02 13:23:20 -07:00
Chris Robinson
ddf521eddc
Make LockContext and UnlockContext inline again
2013-11-02 12:05:02 -07:00
Chris Robinson
7142e3828f
Rename alcGetLatency to ALCdevice_GetLatency
2013-11-02 12:01:58 -07:00
Chris Robinson
90a51d7897
Move a macro definition up nearer to where it's used
2013-10-29 23:54:10 -07:00
Chris Robinson
bc9c3de969
Use a helper macro for making vtable thunks
2013-10-29 20:13:42 -07:00
Chris Robinson
9f0e49917d
Add default handlers for reset, captureSamples, and availableSamples
2013-10-29 15:07:13 -07:00
Chris Robinson
779eb4b82b
Convert the PulseAudio backend to the new interface
2013-10-29 14:44:07 -07:00
Chris Robinson
d4aa4e16a0
Add a macro to forward methods to a base type
2013-10-29 11:22:18 -07:00
Chris Robinson
d2b3615943
Convert the loopback backend to the new interface
2013-10-29 10:38:55 -07:00
Chris Robinson
3437769ba0
Remove a couple unnecessary (and incorrect) parameter names
2013-10-28 22:29:59 -07:00
Chris Robinson
3c65c946d4
Fix capture with the new backend interface
2013-10-28 22:03:54 -07:00
Chris Robinson
16d5d5760c
Convert ALSA to the new backend interface
2013-10-28 21:56:14 -07:00
Chris Robinson
7a424ab4bf
Don't return a void
2013-10-28 20:23:41 -07:00
Chris Robinson
823782a33f
Declare LoadLib functions in one place
2013-10-28 17:48:48 -07:00
Chris Robinson
321644de7c
Add a missing compat.h include for portaudio
2013-10-28 17:48:03 -07:00
Chris Robinson
a407d57639
Rename the support method to querySupport
2013-10-28 17:23:19 -07:00
Chris Robinson
6fd857739c
Support capture backends with the new interface
2013-10-28 17:04:44 -07:00
Chris Robinson
21f1e54cb9
Create and use a backend wrapper for capture
2013-10-28 14:38:55 -07:00
Chris Robinson
f8c95f1e90
Add audio capture methods to ALCbackend
2013-10-28 13:51:55 -07:00
Chris Robinson
8d9fb5109b
Move some stuff out of alMain.h
2013-10-28 12:48:13 -07:00
Chris Robinson
20bcb68ad6
Move ALCbackend base stuff to a separate file
2013-10-28 12:30:57 -07:00
Chris Robinson
0617df9b5f
Fix a couple casts
2013-10-28 12:12:26 -07:00
Chris Robinson
f24cb44781
Move the device mutex to the backend
2013-10-28 12:05:33 -07:00
Chris Robinson
2912d130c2
Separate compatibility declarations
2013-10-28 11:26:26 -07:00
Chris Robinson
034935b2e1
Modify how VCALL is handled
...
Now instead of specifying the arguments as a third argument to the macro, like
VCALL(object,function,(arg1, arg2));
they are specified separately after the macro, like
VCALL(object,function)(arg1, arg2);
Also, VCALL_NOARGS has been removed in favor of VCALL0, which behaves like
above but expects an empty argument list (a separate macro is needed to work
around preprocessor limitations).
2013-10-28 11:06:04 -07:00
Chris Robinson
c1cdd3095b
Convert the Null backend to the ALCbackend style
2013-10-28 08:29:19 -07:00
Chris Robinson
dc7ed39fa7
Add a backend factory base type
2013-10-28 07:27:35 -07:00
Chris Robinson
c8603092d3
Add a default getLatency to ALCbackend
...
And make sure the backend is properly deleted.
2013-10-28 05:57:07 -07:00
Chris Robinson
f065700ef9
Move the lock/unlock methods to the backend
2013-10-28 05:10:28 -07:00
Chris Robinson
e54983694b
Add missing header to git
2013-10-27 16:37:40 -07:00
Chris Robinson
3ed425d7ef
Move the ALCdevice handle to the ALCbackend base
2013-10-27 16:20:47 -07:00
Chris Robinson
af8be56f17
Use an ALCbackend object to access playback backends
...
This is the start of a backend redesign. Currently, a wrapper object is used to
avoid having to redo all the backends at once, but they should slowly be
converted to derive from ALCbackend instead. The ALCbackend interface can
change as needed.
2013-10-27 14:24:55 -07:00
Chris Robinson
bf465eb2eb
Move SetThreadName to threads.c
2013-10-27 08:32:58 -07:00
Chris Robinson
8ceb800def
Rework threading functions
2013-10-27 08:14:13 -07:00
Chris Robinson
f93bfab824
Set a name for the mixer and recording threads
2013-10-27 07:00:44 -07:00
Chris Robinson
ff5277f4d7
Add a method to set the running thread's name
2013-10-26 12:39:19 -07:00
Chris Robinson
54b8690781
Fix a comment
2013-10-26 08:49:37 -07:00
Chris Robinson
a421e515be
Use a helper macro for pi*2
2013-10-08 16:31:23 -07:00
Chris Robinson
11365b42c7
Use helper macros to convert between degrees and radians
2013-10-08 12:39:22 -07:00
Chris Robinson
b42fcce014
Use inline initialization for effect state factory vtables
2013-10-07 14:49:36 -07:00
Chris Robinson
fc31a41473
Constify the effect parameter of effect getters
2013-10-07 12:56:41 -07:00
Chris Robinson
997f6228de
Use the UNUSED macro in the effects
2013-10-07 08:34:54 -07:00
Chris Robinson
32e85d469b
Use the UNUSED macro in the backends
2013-10-07 08:00:18 -07:00
Chris Robinson
1518895e15
Use an UNUSED macro instead of void-tagging unused parameters
2013-10-07 07:44:09 -07:00
Chris Robinson
b5fece0381
Add a CMake option to not define the IDs used on Windows
...
This includes the GUIDs, IIDs, CLSID, and PropertyKeys. It is up to the user
to ensure the appropriate IDs are defined when linked.
2013-10-07 06:36:58 -07:00
Chris Robinson
79edd2cf3b
Use a macro for the silence threshold
2013-10-06 17:25:47 -07:00
Chris Robinson
6425480d40
Don't store the effect slot in SendParams
...
This makes it much more like DirectParams.
2013-10-06 10:11:01 -07:00
Chris Robinson
8448b94c0b
Rename Filter param member to LpFilter
2013-10-06 09:33:02 -07:00
Chris Robinson
9ee3d01f6e
Use a simpler U64 macro to make 64-bit constants
2013-10-06 04:21:03 -07:00
Chris Robinson
ba52ac9bcd
Finalize AL_SOFT_deferred_updates
2013-10-05 06:14:04 -07:00
Chris Robinson
43c375716a
Only rest as long as needed in the Null renderer
2013-10-05 00:33:56 -07:00
Chris Robinson
ead8573aaf
Add some more missing enums
2013-10-03 07:57:54 -07:00
Chris Robinson
41175ec84c
Implement the Compressor effect
2013-10-03 07:55:12 -07:00
Chris Robinson
b9fd3f9eb4
Add missing enum to the list
2013-10-03 07:32:01 -07:00
Chris Robinson
01a5946a2e
Compile using -std=c99 when available
2013-10-03 05:45:12 -07:00
Chris Robinson
2e605590a2
Convert autowah.c line-endings
2013-10-03 05:04:39 -07:00
Chris Robinson
764ea95781
Use helpers to set channel gain arrays
...
Also avoid unnecessary clearing.
2013-10-03 05:02:16 -07:00
Chris Robinson
99fa5911bc
Implement the Autowah effect.
2013-10-03 03:37:03 -07:00
Chris Robinson
2f676832bc
Avoid a divide-by-0 when distortion edge is 1
2013-09-04 15:46:05 -07:00
Chris Robinson
94884ed04b
Use a separate value for the maximum buffer channels
...
Unlike the device, input buffers are accessed based on channel numbers
instead of enums. This means the maximum number of channels they hold
depends on the number of channels any one format can have, rather than
the total number of recognized channels. Currently, this is 8 for 7.1.
2013-07-23 00:13:15 -07:00
Chris Robinson
2219ce2475
Implement master high-pass filter for EAXREVERB
2013-07-21 22:12:50 -07:00
Chris Robinson
51791e6a54
Remove an unused function
2013-07-21 03:22:14 -07:00
Chris Robinson
d85f0c0bb2
Improve the source's low-pass filter response
2013-07-20 22:18:44 -07:00
Chris Robinson
52096234e1
Limit the source step to 10
...
This means the combination of the buffer frequency, source pitch, and
doppler shift can't exceed 10x the device playback frequency.
This is needed to keep the mixer from starving with a really high
increment, causing small DstBufferSize values that require a lot of
iterations.
2013-07-02 06:57:27 -07:00
Chris Robinson
ed0568bb24
Fix a potential infinite loop.
...
If the first XDG_CONFIG_DIRS entry isn't a proper relative path,
it would never break the loop.
2013-06-19 23:24:06 -07:00
Chris Robinson
a9fac12969
Work around some problems with KDevelop's parser
2013-06-18 14:33:39 -07:00
Chris Robinson
3c90ed95af
Look for alsoft.conf in the XDG_CONFIG_DIRS and XDG_CONFIG_HOME directories
...
This follows the XDG Base Directory Specification. The old files/locations are
still supported, but configs found in XDG_CONFIG_DIRS take precedence over
/etc/openal/alsoft.conf, and a config found in XDG_CONFIG_HOME takes precedence
over $HOME/.alsoftrc.
2013-06-16 22:55:11 -07:00
Chris Robinson
48d5002190
Trace config file names being loaded
2013-06-16 20:43:31 -07:00
Chris Robinson
784e396cc7
Don't split config sections into separate blocks
2013-06-16 19:52:56 -07:00
Chris Robinson
8bd77be522
Improve parsing of the config files
...
This will also now recognize (and strip) quotation marks from around values.
2013-06-16 18:42:27 -07:00
Chris Robinson
a5471ce0a4
Better handle spaces between string list entries
2013-06-16 15:44:41 -07:00
Chris Robinson
817ca82e4b
Fix input and feedback in the echo effect
2013-06-10 05:57:27 -07:00
Chris Robinson
68898dad1e
Don't open the log file with both 'truncate' and 'append' flags
2013-06-07 03:38:09 -07:00
Chris Robinson
024374e0ce
Use explicit bit offsets when checking for SSE and SSE2
...
Clang's cpuid.h doesn't contain the bit_* macros.
2013-06-06 19:30:55 -07:00
Chris Robinson
647398d7c6
Use ALfilterState for the distortion effect filters
2013-06-06 03:24:44 -07:00
Chris Robinson
a371de080b
Silence some clang warnings
2013-06-05 01:52:49 -07:00
Chris Robinson
0e0f70b288
Avoid a NULL dereference
2013-06-04 17:36:54 -07:00
Chris Robinson
7257aa3ed2
Allow enabling HRTF through a context creation attribute
2013-05-31 19:29:32 -07:00
Chris Robinson
69e0c19767
Start an extension that can query the status of HRTF rendering
2013-05-31 16:03:59 -07:00
Chris Robinson
a7a3d1e194
Avoid an unnecessary loop
2013-05-29 22:34:57 -07:00
Chris Robinson
9c3f1d11f0
Check the right flag for tracing SSE2 support
2013-05-29 21:28:27 -07:00
Chris Robinson
764e3aa496
Fix up the naming convention of effect methods
2013-05-29 11:17:45 -07:00
Chris Robinson
e96cc656e9
Use C99's inline instead of __inline
2013-05-28 22:27:07 -07:00
Chris Robinson
48aa1e10d6
Use the high-shelf filter in place of low-pass
...
They effectively both work to lower (or raise) high frequencies. However, the
high-shelf performs better when gain=1.
2013-05-28 10:57:38 -07:00
Chris Robinson
6556626055
Simplify and fix some filter gain calculations
2013-05-27 21:57:22 -07:00
Chris Robinson
59a38442ac
Use ALfilterState for the modulator high pass filter
2013-05-27 21:24:28 -07:00
Chris Robinson
0c7c5327c9
Use ALfilterState for the master echo and reverb filters
2013-05-27 19:55:00 -07:00
Chris Robinson
feeec34333
Use ALfilterState for the source direct and send filters
2013-05-27 19:14:02 -07:00
Chris Robinson
b1ae44206f
Move ALEQFilter to alFilter.c/h and rename it to ALfilterState
2013-05-27 15:32:02 -07:00
Chris Robinson
334a7c1d59
Cleanup the ALeffectStateFactory_create methods
...
Get rid of the ALeffectStateFactory_create macro, and use the VCALL_NOARGS
helper (requires adding the 'this' factory parameter).
2013-05-27 13:16:17 -07:00
Chris Robinson
9e84f38a46
Use generic VCALL[_NOARGS] macros instead of type-specific wrappers
2013-05-27 11:48:29 -07:00
Chris Robinson
06c8442af6
Rename a variable
2013-05-26 17:10:57 -07:00
Chris Robinson
0a4be3470e
Pre-apply the a[0] EQ filter coefficient
...
Saves 20 fp divisions per sample
2013-05-26 17:04:45 -07:00
Chris Robinson
82caba6bbe
Use the helper macros in more places
2013-05-26 08:54:34 -07:00
Chris Robinson
8808159d55
Add helper macros to set an error and return, and use it in a few places
2013-05-26 00:01:07 -07:00
Chris Robinson
d1c5599c8e
Use an ALeffectProps union to store the effect properties
2013-05-25 22:07:31 -07:00
Chris Robinson
6571d80540
Use a Delete method for deletable objects
2013-05-25 21:04:00 -07:00
Chris Robinson
2da6caeaa6
Update the Null effect so it can act as a guide to new effects
2013-05-25 17:42:34 -07:00
Chris Robinson
e157238ce7
Use vtables for setting effect properties
2013-05-24 23:26:59 -07:00
Chris Robinson
357cf72ab3
Move remaining effects to the effects subdir
2013-05-23 21:33:16 -07:00
Chris Robinson
2376683128
Move reverb to the effects subdir
2013-05-23 19:48:24 -07:00
Chris Robinson
f667c028e6
Move the AL_EFFECT_NULL state into a separate file
2013-05-23 18:50:07 -07:00
Chris Robinson
be4a4d7468
Use fegetenv/fesetenv to backup and restore the FPU state
2013-05-22 23:05:26 -07:00
Chris Robinson
eb15b13ca1
Merge the fesetround FPU handler with the assembly one
...
The assembly is only needed for SSE since we can't access the intrinsics
without the -msse switch, which itself would cause SSE code to be generated
elsewhere automtically.
2013-05-22 22:21:00 -07:00
Chris Robinson
38a9e642df
Check for SSE2 and set the denormals-are-zero bit for mixing if available
2013-05-22 17:04:37 -07:00
Chris Robinson
b80efeb87d
Set the correct SSE bits for round-to-zero
2013-05-22 16:31:43 -07:00
Chris Robinson
52efb8d7f4
Use restrict instead of RESTRICT
2013-05-22 15:11:39 -07:00
Chris Robinson
a6fa4a8bc2
Recognize DSSPEAKER_5POINT1_SURROUND (and 7POINT1) with DSound
2013-05-22 14:25:33 -07:00
Chris Robinson
cdbb0722f6
Avoid using a temp buffer for al_print
...
It's now using two *printf calls, which unfortuantely means there could be a
race between the two and cause the message to break up if something else tries
to print to the same file. This shouldn't really be a big deal since al_print
isn't used that often, and it now allows for lines of practically unlimited
length.
2013-05-22 03:02:39 -07:00
Chris Robinson
2eb8a520d4
Add casts to silence MSVC
2013-05-22 00:07:23 -07:00
Chris Robinson
0a07ed14c2
Rename DELETE to DELETE_OBJ
...
Because Windows.
2013-05-21 23:42:40 -07:00
Chris Robinson
604726c639
Add a DELETE macro to help destroy objects
2013-05-21 13:27:27 -07:00
Chris Robinson
eaccaa5028
Rename the effect state's Destroy method to Destruct
2013-05-21 13:02:56 -07:00
Chris Robinson
a5d94f5d09
Use factories to create and destroy effect states
2013-05-21 12:47:18 -07:00
Chris Robinson
e4186f4903
Use a properly-defined history for the FILTER struct
2013-05-21 07:10:24 -07:00
Chris Robinson
3ee0f8feb9
Avoid storing the device frequency in the equalizer
2013-05-21 05:33:54 -07:00
Chris Robinson
5c8c40afef
Auto-generate wrappers to upcast objects before calling user methods
2013-05-21 05:02:25 -07:00
Chris Robinson
5516d8df0b
Use macros to help define vtables for effect states
2013-05-21 04:18:02 -07:00
Chris Robinson
fba9ac6db1
Avoid storing the device frequency in the distortion state
2013-05-21 02:43:59 -07:00
Chris Robinson
de387c853f
The effect state being destroyed can't be NULL
2013-05-21 02:37:27 -07:00
Chris Robinson
44da54ec7f
Rename some inheritance macros
2013-05-21 02:30:11 -07:00
Chris Robinson
b6da74b6e2
Pre-scale the chorus and flanger delays to be in samples
2013-05-21 01:59:44 -07:00
Chris Robinson
7e9960f7f1
Avoid storing some chorus and flanger properties in the effect state
2013-05-21 01:38:43 -07:00
Chris Robinson
c6872d4d86
Process 64 samples at a time for chorus and flanger effects
2013-05-20 04:41:03 -07:00
Chris Robinson
5b706f3bdc
Process 64 samples at a time for some effects
...
This should help with the non-interleaved samples of the output, and
allow skipping channels that don't contribute to the output.
2013-05-20 04:16:48 -07:00
Chris Robinson
80459b13e4
Split flanger delay calculation into separate methods
2013-05-20 03:41:32 -07:00
Chris Robinson
012fbc36b9
Split chorus delay calculation into separate methods
2013-05-20 02:38:06 -07:00
Chris Robinson
4c436b106d
Use some macros to help with deriving types
2013-05-20 01:32:02 -07:00
Chris Robinson
6aa722808e
Clear all the old channel gains to 0 before setting them
2013-05-20 00:02:47 -07:00
Chris Robinson
c693e649e6
Fix a potential leak when mmdevapi fails to open
2013-05-19 03:19:19 -07:00
Chris Robinson
1976d64814
Avoid recalculating the same coefficient
2013-05-19 03:18:21 -07:00
Chris Robinson
78e7c1c27b
Implement distortion and equalizer effects
...
Code provided by Mike Gorchak
2013-05-18 01:33:01 -07:00
Chris Robinson
a7ad6080f0
Modulator fixes
...
Modulator functions return 0..1 instead of -1..+1
Apply high-pass filter before modulation
Increase fractional precision to 24 bits from 16
Thanks to Mike Gorchak
2013-05-18 00:43:09 -07:00
Chris Robinson
563f16dc2a
Fix overflow issues when converting float to int
...
32-bit floats can only reach between -16777215...+16777215 (25 bits) before it
starts losing whole-number accuracy. Some compiler optimizations may break
trying to multiply a float by 2147483647.0 when the result is given right to a
float parameter, causing it instead to multiply by the nearest representable
float value, 2147483648.0.
2013-04-22 00:52:50 -07:00
Chris Robinson
b313c881c0
Add a missing cast to silence MSVC
2013-03-22 11:21:21 -07:00
Chris Robinson
6bf8f01af5
Report the actual ALSA error if setting the buffer metrics fails
2013-03-18 05:21:41 -07:00
Chris Robinson
bf54de4984
Use less math to clamp floats to -1...+1
...
The previous code could have issues as precision lowers. This should hopefully
work better while only using one if check instead of two.
2013-03-17 09:07:55 -07:00
Chris Robinson
eb1080910e
Use force_align_arg_pointer for QSA
2013-03-15 04:32:46 -07:00
Chris Robinson
d237410d1d
Add a QSA backend for QNX
2013-03-14 01:29:20 -07:00
Chris Robinson
2486f13dae
Remove unnecessary NULL checks
2013-03-13 23:36:45 -07:00
Chris Robinson
3fd0f23e48
Add Chorus and Flanger effects
...
Code provided by Mike Gorchak
2013-03-13 23:31:12 -07:00
Chris Robinson
991aba286f
Move the effect-specific get/set methods to where the effect is implemented
2013-03-13 21:53:42 -07:00
Chris Robinson
f1b0f67553
Build an appropriate channel map for PulseAudio
2013-02-08 18:59:48 -08:00
Chris Robinson
e358882f14
Destroy the ring buffer when closing down a portaudio device
2013-02-01 18:38:44 -08:00
Chris Robinson
564a182259
Avoid an underflow in the SSE mixers if BufferSize is less than 4
2012-12-24 05:49:44 -08:00
Chris Robinson
9cd086a707
Filter unneeded thread messages with MMDevApi
2012-12-24 05:37:53 -08:00
Chris Robinson
be25e6802d
Add support for OpenSL ES 1.0.1 on Android
2012-12-12 14:36:58 -08:00
Chris Robinson
e51574c764
Trace the list of supported backends
2012-12-04 13:46:51 -08:00
Chris Robinson
893a1bedbc
Use +/-90 degrees for stereo sources with non-HRTF stereo output.
2012-12-04 05:30:06 -08:00
Chris Robinson
4621a7b426
Add support for float32 output to CoreAudio
2012-12-03 11:50:02 -08:00
Chris Robinson
4808313e70
Use the correct multiplier for int32 output with CoreAudio
2012-12-03 10:44:02 -08:00
Chris Robinson
1fb9311d82
Lock the device before calling aluHandleDisconnect
...
PulseAudio causes an assert if being relocked inside a callback on the worker
thread, where aluHandleDisconnect is called. We can assume it's already locked
there, so just make sure the device is locked before being calling it.
2012-12-02 11:30:23 -08:00
Chris Robinson
dd34daed42
Trace the opened device name in alcCaptureOpenDevice
2012-12-02 06:37:34 -08:00
Chris Robinson
830428fb06
Use WARN when implicitly deleting resources with the context
2012-12-02 01:17:26 -08:00
Chris Robinson
0ca7ab2cf8
Explicitly check for malloc.h
2012-11-25 19:20:35 -08:00
Chris Robinson
a0c39989f5
malloc.h isn't standard, and is only needed for _aligned_malloc
2012-11-25 02:33:20 -08:00
Chris Robinson
209d09ae13
Avoid locking PulseAudio's mainloop when starting and stopping capture
...
The mainloop is already locked by the caller, and double-locking interferes
with the subsequent wait.
2012-11-19 16:50:03 -08:00
Chris Robinson
2d800e99e2
Fix off-by-one error in the makehrtf dither and add a resample option
...
Also fixes some size_t type warnings
2012-11-18 09:29:58 -08:00
Chris Robinson
0518ecca14
Avoid storing the SSE state if it's not supported
2012-11-13 15:20:36 -08:00
Chris Robinson
2f07c46e20
Include standard headers before conditional ones
2012-11-04 22:36:34 -08:00
Chris Robinson
3da1b540fd
Use the stored buffer metrics for the mmdevapi buffer size
2012-11-04 22:35:35 -08:00
Chris Robinson
92dde81296
Add rudimentary latency tracking for mmdevapi
...
This won't be as granular as it could be, since it only updates when the wakeup
event trips (which may or may not happen more often than OpenAL's mix updates).
A more correct method would be to query GetCurrentPadding directly, but that
would require sending a message to the processing thread and waiting for a
reply, since we can't guarantee COM on the calling thread.
2012-11-04 08:35:39 -08:00
Chris Robinson
e2368eb960
Use an array to specify the offset for each channel of the device buffer
...
This effectively inverts the DevChannels array
2012-11-04 04:41:11 -08:00
Chris Robinson
3e71a7cb94
Rename some struct fields for DirectSound
2012-11-04 01:18:39 -08:00
Chris Robinson
b92ad830ef
Avoid recreating the DSound primary buffer
2012-11-04 00:37:31 -07:00
Chris Robinson
e868dad61c
Make a decimal value a float type
2012-10-31 06:58:16 -07:00
Chris Robinson
4a3d36a176
Finalize AL_SOFT_source_latency
2012-10-31 05:09:42 -07:00
Chris Robinson
3c3e3b123b
Add a couple comments to the code
2012-10-26 20:11:59 -07:00
Chris Robinson
f02a9935c6
Avoid branching when clamping and converting float samples to integer
2012-10-26 15:31:14 -07:00
Chris Robinson
e2e502970c
Move some math functions to where they're used
2012-10-25 17:24:22 -07:00
Chris Robinson
8a67e5cfa2
Use an asterisk to denote a requested format option in the trace
2012-10-16 07:46:04 -07:00
Chris Robinson
4f5aafe59f
Put the HRTF DirectParams into an anonymous struct
2012-10-15 01:37:37 -07:00
Chris Robinson
a14383d6cc
Constify the direct and send parameters given to the mixer
2012-10-15 01:31:58 -07:00
Chris Robinson
fe1903fb56
Use a separate step to deinterlace reverb samples
2012-10-14 11:55:03 -07:00
Chris Robinson
f0d27e5f91
Remove the unused Device parameter
2012-10-14 11:29:28 -07:00
Chris Robinson
a852669dce
Store the output buffers in the DirectParams struct
2012-10-14 11:21:52 -07:00
Chris Robinson
3240894cd5
Remove the now-unused Source parameter from the DryMix methods
2012-10-14 11:04:36 -07:00
Chris Robinson
0b679167c9
Store some more HRTF info in the DirectParams struct
2012-10-14 10:57:11 -07:00
Chris Robinson
5ac0a93fba
Mark some parameters as const and/or RESTRICT
2012-10-14 10:27:15 -07:00
Chris Robinson
5c70e6b9ab
Don't add the dry gain to the mixing matrix
2012-10-13 11:10:58 -07:00
Chris Robinson
9bd3b88a58
Silence an implicit int-to-float conversion warning on MSVC
2012-10-13 11:00:43 -07:00
Chris Robinson
01136ecd51
List the in-progress AL_SOFT_source_latency extension
2012-10-13 00:59:46 -07:00
Chris Robinson
1212523470
Implement the double and int64 source setters
...
Note that currently the int64 setters do not range check before being passed to
the int setters, erroneously chopping off the upper bits.
2012-10-13 00:56:39 -07:00
Chris Robinson
73105b2d4b
Fix copying the listener Up vector
2012-10-12 23:35:00 -07:00
Chris Robinson
06ab9cf70e
Use the enum to set the default distance model
2012-10-12 23:28:51 -07:00
Chris Robinson
a3d4868ef4
Initialize the listener velocity parameter
2012-10-12 08:01:02 -07:00
Chris Robinson
815b03855b
Apply the listener matrix to the listener velocity once
2012-10-12 07:56:37 -07:00
Chris Robinson
6750bbb1d7
Avoid needlessly copying the listener matrix
2012-10-12 07:45:20 -07:00
Chris Robinson
43c8c4fa29
Apply the listener position to the transformation matrix
2012-10-12 07:38:29 -07:00
Chris Robinson
25b8a95987
Check the distance against epsilon to determine if it matches
2012-10-12 07:10:51 -07:00
Chris Robinson
99fcd6f816
Properly scale wide-stereo sources
2012-10-10 04:08:35 -07:00
Chris Robinson
513c6db0d5
Avoid mixing to a send slot if the gain is too low
2012-10-10 03:52:45 -07:00
Chris Robinson
1b7f01b7cc
The max step is no longer dependent on the channel count
2012-10-10 03:40:01 -07:00
Chris Robinson
a4f21aaa64
Set Hrtf.Moving after setting the source params instead of after mixing
2012-10-09 06:54:21 -07:00
Chris Robinson
39bc2ba65c
Build the listener matrix separately
2012-10-09 06:19:36 -07:00
Chris Robinson
d598f82722
Don't include alListener.h from alMain.h
2012-10-09 04:48:12 -07:00
Chris Robinson
c22408cb2a
Store a pointer to the listener in the context
2012-10-09 04:44:27 -07:00
Chris Robinson
a98361ebbe
Don't assume x86 or x64 to use IsProcessorFeaturePresent
2012-10-08 00:43:51 -07:00
Chris Robinson
999f0783c5
Fix a type conversion warning
2012-10-08 00:32:35 -07:00
Chris Robinson
2a6dd2f243
Fix a type mismatch
2012-10-07 08:19:09 -07:00
Chris Robinson
65c7c468cc
Use IsProcessorFeaturePresent to detect SSE on Windows
2012-10-07 08:18:22 -07:00
Chris Robinson
ebdf636759
Revert "Use __cpuid from intrin.h in Windows when available"
...
This reverts commit 6b870714a9
.
2012-10-07 08:08:11 -07:00
Chris Robinson
6b870714a9
Use __cpuid from intrin.h in Windows when available
2012-10-07 05:36:25 -07:00
Chris Robinson
708f3ccc3d
Add trace, warn, and error markers to logged output
2012-10-07 04:31:31 -07:00
Chris Robinson
84f4afa5f2
Lock the device using the pulseaudio main loop
2012-10-07 02:25:59 -07:00
Chris Robinson
991e21a712
Avoid unnecessarily locking the list lock
2012-10-07 00:13:23 -07:00
Chris Robinson
1a9cf7ab80
Shorten format trace messages
2012-10-06 23:32:36 -07:00
Chris Robinson
9501f1cb9e
Define WIN32_LEAN_AND_MEAN when including windows.h in alMain.h
2012-10-06 21:36:15 -07:00
Chris Robinson
d52cb3708b
Include windows.h before cpuid.h to avoid __cpuid clashes
2012-10-06 21:30:03 -07:00
Chris Robinson
fa8d374613
Rename a couple functions
...
Since they don't use the stack anymore.
2012-10-05 06:44:55 -07:00
Chris Robinson
0d26b0dcc2
Put temporary storage in the device instead of on the stack
2012-10-05 06:42:26 -07:00
Chris Robinson
a6287fd407
Add a special resampler for matching sample rates
2012-10-05 06:03:19 -07:00
Chris Robinson
16bdf79d4c
Round up the device's default slot alignment
2012-10-05 00:32:41 -07:00
Chris Robinson
0b47844606
Fix potential buffer overflow with temp sample space
2012-10-05 00:27:29 -07:00
Chris Robinson
468759e6ab
Scale and round NumUpdates when PulseAudio changes the sample rate
2012-10-04 23:36:59 -07:00
Chris Robinson
f138774d78
Avoid void* arithmetic
2012-10-04 06:16:16 -07:00
Chris Robinson
068da3fe83
Make sure the output buffer pointer is updated in case multiple iterations are needed
2012-10-03 02:35:43 -07:00
Chris Robinson
b5d9d8e005
Reset maxlength if PulseAudio updates the playback rate
2012-10-02 17:01:35 -07:00
Chris Robinson
8bd0592e3f
Combine early reflections and late reverb in VerbPass
2012-09-27 17:30:35 -07:00
Chris Robinson
06a0d1b86e
Use an unsigned type for the sample position fraction
2012-09-27 13:52:45 -07:00
Chris Robinson
41b2c2f3bb
Remove an unneeded parameter from the resampler
2012-09-27 02:46:15 -07:00
Chris Robinson
68faef5b84
Ensure the device's default effect slot is properly aligned
2012-09-26 18:21:03 -07:00
Chris Robinson
ed82194260
Deinterlace audio when loading it into the stack.
...
It may be better to deinterlace it on load into the buffer, though I don't
imagine this will affect much. It could be nice for consistency's sake, though
it would also complicate things if we ever want to support direct access to
buffer data.
2012-09-26 17:16:25 -07:00
Chris Robinson
012e61b105
Round when calculating NumUpdates from PulseAudio's minreq
2012-09-25 11:32:49 -07:00
Chris Robinson
d19d7321d9
Remove an unnecessary include
2012-09-24 20:39:12 -07:00
Chris Robinson
d4e82d441e
Combine multiple loops into one
2012-09-24 19:07:07 -07:00
Chris Robinson
2ceea21f76
Avoid mixing silence to output
...
"Silence" being less than -100dB.
2012-09-24 15:33:44 -07:00
Chris Robinson
12327da4fe
Remove SSE resamplers. They aren't gaining us much this way.
2012-09-24 14:47:06 -07:00
Chris Robinson
52d403b0d1
Make sure PulseAudio sets an update size that's a multiple of 4 samples with SSE
2012-09-20 15:01:49 -07:00
Chris Robinson
ccd35bffe7
Help ensure the update size is a multiple of 4 with SSE
2012-09-20 14:54:28 -07:00
Chris Robinson
d1c93525ed
Fix matrix multiply used by the SSE cubic resampler
...
Also remove the 4-sample loop. It's not terribly effective.
2012-09-18 18:09:43 -07:00
Chris Robinson
f0732426f2
Precision control bits don't exist with SSE
2012-09-18 15:08:36 -07:00
Chris Robinson
eedbd1e81c
Improve a couple error traces with the HRTF loader
2012-09-18 12:15:43 -07:00
Chris Robinson
e779e64c95
Win64 doesn't allow _controlfp or __control87_2 to set the precision control bits
2012-09-18 11:20:48 -07:00
Chris Robinson
4a86983a6f
Avoid correcting for more non-existing clicks
2012-09-16 09:04:37 -07:00
Chris Robinson
c19d9d3452
Don't try to correct for non-existing clicks.
2012-09-16 08:42:36 -07:00
Chris Robinson
79b6d89b3f
Explicitly give the wet buffer 1 channel
2012-09-16 08:27:50 -07:00
Chris Robinson
535e8fd0f7
Check the proper value for setting WetPendingClicks
2012-09-16 08:15:03 -07:00
Chris Robinson
a240abb6c8
Avoid building redundant mixers
2012-09-16 08:14:26 -07:00
Chris Robinson
dd9d30e248
Implement an SSE MixSend method
2012-09-16 06:19:39 -07:00
Chris Robinson
95535ce99e
Properly restore the SSE control word with __control87_2
2012-09-16 06:01:48 -07:00
Chris Robinson
df2e82da78
Properly handle the SSE control word
2012-09-16 05:35:38 -07:00
Chris Robinson
a1daec66e2
Use __control87_2 when available
2012-09-16 01:44:45 -07:00
Chris Robinson
657ee85136
Use a struct to store the FPU mode
2012-09-16 01:35:16 -07:00
Chris Robinson
28086f6cb7
Implement an SSE cubic resampler
2012-09-14 07:01:58 -07:00
Chris Robinson
45bb010b28
Shorten a warning
2012-09-14 05:05:20 -07:00
Chris Robinson
90e0c74721
Implement an SSE linear resampler
2012-09-14 04:48:53 -07:00
Chris Robinson
a20341ac2a
Ensure the ResampledBuffer is aligned
2012-09-14 04:16:49 -07:00
Chris Robinson
7635afcb52
Use a source param for the resampler and move them to the mixer source
2012-09-14 04:13:18 -07:00
Chris Robinson
9f58edd7a8
Fix up some more header includes
2012-09-14 02:42:36 -07:00
Chris Robinson
0f3a575a09
Don't include alu.h in alMain.h
2012-09-14 02:14:29 -07:00
Chris Robinson
ec74fb9ba2
Enable flush-to-zero mode when possible
2012-09-14 01:10:19 -07:00
Chris Robinson
ff809f2271
Move a couple methods to where they're used
2012-09-12 07:57:50 -07:00
Chris Robinson
41f52fdd6a
Restore support for the previous mhr format
2012-09-12 07:25:05 -07:00
Chris Robinson
613ce3f976
Update fnamelist after handling % markers
2012-09-12 04:55:03 -07:00
Chris Robinson
ce8a0a9fd5
Use PATH_MAX for the fname length
2012-09-12 03:45:26 -07:00
Chris Robinson
f59e4ba7c2
Improve parsing hrtf_tables filenames
2012-09-12 03:41:41 -07:00
Chris Robinson
f4642953d4
Warn about SSE performance with non-multiple-of-4 update sizes
2012-09-11 11:17:41 -07:00
Chris Robinson
88b0c30152
Use the correct size for defaultCoeffs
2012-09-11 10:43:53 -07:00
Chris Robinson
01183ad93b
Minor cleanups for variable declarations
2012-09-11 09:40:08 -07:00
Chris Robinson
3f97af4c8c
Don't use count-specific functions to write to the output buffer
2012-09-11 06:41:24 -07:00
Chris Robinson
4c5cb2189b
Use a non-interleaved DryBuffer
2012-09-11 06:32:42 -07:00
Chris Robinson
98ff6f990a
Do the filtering separately from the mixing
2012-09-11 05:56:19 -07:00
Chris Robinson
7e81918f7b
Update HRTF code
...
This update allows for much more flexibility in the HRTF data. It also allows
for HRTF table file names to include "%r" to represent the device's playback
rate (e.g. if you set hrtf-%r.mhr, then it will try to use hrtf-44100.mhr or
hrtf-48000.mhr depending if the device's output rate is 44100 or 48000,
respectively).
The makehrtf utility has also been updated to support more options and input
file formats, as well as the new mhr format.
2012-09-11 02:11:51 -07:00
Chris Robinson
1b840a3db8
Again try to get _WIN32_IE to behave right with MinGW
2012-09-11 01:39:05 -07:00
Chris Robinson
af3b5c23c8
Try to ensure mixing samples in multiples of 4
2012-09-09 04:27:47 -07:00
Chris Robinson
9f208417df
Use the right method to clear a __m128 to 0
2012-09-09 04:09:31 -07:00
Chris Robinson
f1ce139997
Use SSE to do 4 samples at once (non-HRTF direct mix), instead of to apply a matrix row
...
MaxCHannels no longer needs to be a multiple of 4 now, either.
2012-09-09 04:02:54 -07:00
Chris Robinson
f56dddfa73
Implement MixDirect_SSE separately from the C and Neon versions
2012-09-09 00:53:54 -07:00
Chris Robinson
2bf1979d4a
Move the target effect slot to the SendParams struct
2012-09-08 22:32:30 -07:00
Chris Robinson
89cab3cd39
Remove STACK_DATA_SIZE in favor of BUFFERSIZE
2012-09-08 22:09:34 -07:00
Chris Robinson
6723d27e06
Remove some unused code
2012-09-08 21:53:04 -07:00
Chris Robinson
1c03025090
Separate the resampling and mixing steps
2012-09-08 21:34:36 -07:00
Chris Robinson
2b5fdad2c8
Free the global ALSA config after opening capture devices too
2012-09-02 14:26:46 -07:00
Lauri Kasanen
a6f9ede849
alsa: Free the global config cache to remove a lot of reported leaks
...
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
2012-09-02 14:16:23 -07:00
Chris Robinson
795909c39e
Minor cleanups for mixer_inc
2012-08-29 02:43:19 -07:00
Chris Robinson
3c042a054d
Add an SSE-enhanced path for applying the mixer matrix
2012-08-29 01:56:04 -07:00
Chris Robinson
332d66c183
Make sure device buffers are 16-byte aligned
2012-08-29 01:40:42 -07:00
Chris Robinson
f2fa5e7c88
Print the error when reporting snd_pcm_delay failure
2012-08-27 22:52:37 -07:00
Chris Robinson
3b735cc34a
Use _aligned_free for pointers returned by _aligned_malloc
2012-08-24 17:45:16 -07:00
Chris Robinson
bc1ce7b3ac
Add methods to get source properties as doubles
2012-08-20 15:26:35 -07:00
Chris Robinson
50fa9a44be
Properly export alGetSource3i64SOFT
2012-08-20 14:48:08 -07:00
Chris Robinson
f5e0500df4
Add a macro to help make a 64-bit value
2012-08-19 22:31:55 -07:00
Chris Robinson
37924887e8
Use a default method to provide a dummy latency
2012-08-19 12:31:59 -07:00
Chris Robinson
0db7c4131b
Hold the device lock with PulseAudio between mixing and writing
2012-08-18 17:20:20 -07:00
Chris Robinson
a56a974149
Hold the device lock with ALSA between mixing and writing
2012-08-18 17:18:53 -07:00
Chris Robinson
af7f3768fa
Use non-blocking access for ALSA playback
2012-08-18 17:01:56 -07:00
Chris Robinson
0865db564f
Move the device lock into the backend function table
...
For backend-specific implementations: this should hold the audio mixer loop for
playback devices, and provide recursive mutex behavior.
2012-08-18 15:58:04 -07:00
Chris Robinson
2b020040b4
Keep the backend device open until the last reference is released
...
This should generally happen with the next ALCdevice_DecRef call unless the
device is in the middle of being used in another thread, in which case it's
probably best to not remove the resources.
2012-08-18 14:49:42 -07:00
Chris Robinson
3ae5fcbd7e
Add the start of AL_SOFT_source_latency
...
This extension will provide a way for apps to get accurate latency and playback
position information
2012-08-18 11:06:39 -07:00
Chris Robinson
ac4fc4026c
Add a device method to retrieve the active latency
...
This is effectively the time until the next update will be heard by the user,
or the closest approximation thereof, in nanoseconds.
2012-08-17 13:38:52 -07:00
Chris Robinson
9737f68315
Place the alignment attribute before the variable declaration
2012-08-16 10:42:48 -07:00
Chris Robinson
3c395a82db
Fix aligned allocator fallback
2012-08-16 10:30:13 -07:00
Chris Robinson
147fd9de4e
Avoid dynamic handling of libsndio
...
This makes it safer and easier to handle as OpenBSD updates it
2012-08-16 10:12:50 -07:00
Chris Robinson
0bca771a88
Apply HRTF mixer coefficients with stepping using SSE
2012-08-15 08:19:04 -07:00
Chris Robinson
f4ff63e271
Check the max CPUID functions before calling them
2012-08-15 06:28:45 -07:00
Chris Robinson
2859357939
Add wrapper methods to ensure aligned allocations
2012-08-15 05:50:40 -07:00
Chris Robinson
4d157d2849
Make sure the working coefficients are aligned for the SSE mixer
2012-08-15 03:43:36 -07:00
Chris Robinson
6ebeb3b4f7
Check the correct macro for ARM Neon support
2012-08-15 01:32:17 -07:00
Chris Robinson
2e18baa3c8
Don't bother handling MMX since we don't use it
2012-08-15 01:29:19 -07:00
Chris Robinson
c9e87a19a9
Add cmake options to disable or require support for CPU extensions
2012-08-15 01:24:50 -07:00
Chris Robinson
3b87e29e63
Move mixers into separate source files
2012-08-15 01:01:55 -07:00
Chris Robinson
e9a20cb985
Add an SSE-enhanced HRTF mixer using intrinsics
...
Not as good as it could be, but it's something
2012-08-14 03:53:07 -07:00
Chris Robinson
17dfaa3aae
Add a config option to disable use of CPU extensions
2012-08-13 10:37:49 -07:00
Chris Robinson
0a3eba08d8
Allow building multiple types of mixers, selecting based on CPU caps
2012-08-13 09:18:46 -07:00
Chris Robinson
add53e28c2
Check for some CPU extensions
2012-08-13 09:07:01 -07:00
Chris Robinson
f42f655ea9
Don't unlock the pulseaudio mainloop when mixing
...
Lock contention could cause a lengthy delay between mixing and writing the
audio. There shouldn't be any risk of dead-locking as the device lock should
never be held when the mainloop gets locked.
2012-08-12 03:52:38 -07:00
Chris Robinson
8304fc1bef
Handle the scalar values a bit better
2012-08-11 06:20:24 -07:00
Chris Robinson
ea84fee952
Use a more efficient method to blend HRTF delays and coefficients
2012-08-11 02:16:34 -07:00
Chris Robinson
d6fd52a0e5
Add an option for wide stereo sources
...
Replaces the old stereodup option
2012-08-09 05:38:07 -07:00
Chris Robinson
0dde7dd88a
Use a more efficient method to offset the speaker angles when computing gains
2012-08-09 02:31:19 -07:00
Chris Robinson
1323e11701
Interpolate between HRTF delay samples using the delay fraction
2012-07-20 15:08:11 -07:00
Chris Robinson
7ac9944bb3
Increase the directional change sensitivity for the HRTF delta
2012-07-20 14:38:49 -07:00
Chris Robinson
6bd535bed0
Use wrappers for float-typed math functions
2012-06-29 02:12:36 -07:00
Chris Robinson
583dc8dbca
Don't use all caps for enum value names
2012-06-28 18:49:49 -07:00
Chris Robinson
bc6751237c
Clamp the Y position before trying to get the elevation
2012-06-28 17:26:00 -07:00
Chris Robinson
6f3be31b60
Add some includes
2012-06-20 03:01:19 -07:00
Chris Robinson
8001d86751
Add missing include
2012-06-19 22:15:19 -07:00
Chris Robinson
acca3e5a21
Use a proper method to wait for a PulseAudio operation
2012-06-19 10:37:09 -07:00
Chris Robinson
ef1f8aa9a0
Don't needlessly verify a device
2012-06-19 00:25:45 -07:00
Chris Robinson
ac84d95c6e
Silence some GCC warnings
2012-06-17 22:17:03 -07:00
Chris Robinson
785f52aa29
Only try float32 with DSound when specifically requested
...
Some hardware drivers seem to have a bug where a buffer descriptor with a
32-bit float sample type ends up creating a non-float32 buffer.
2012-06-17 04:13:01 -07:00
Chris Robinson
051195a991
Avoid failing if ALSA can't set a buffer or period time near to our request
...
These functions should not fail, but there seem to be bugs that cause them to
sometimes. We're flexible enough to handle almost anything it throws back at us
though, so anything is better than nothing here.
2012-06-16 23:02:59 -07:00
Chris Robinson
90ca6675c2
Allow PulseAudio to spawn a server by default
...
Since only one backend is used at a time now, the issues with device ownership
aren't really prevelant anymore. An application that tries to open all
enumerated devices won't run into the problem of spawning a server and end up
preventing other backend devices from working.
2012-06-16 22:37:45 -07:00
Chris Robinson
0db9730a50
Add an option to allow PulseAudio to move streams
...
This could be made the default, if there's a safe way to update the AL device
specifier.
2012-06-16 22:32:19 -07:00
Chris Robinson
46840ee787
Add DEVPKEY_Device_FriendlyName declaration for mingw-w64 compatibility
2012-06-14 18:10:10 -07:00
Chris Robinson
259e4f5b38
Rename AllDevice -> AllDevices
2012-05-09 16:28:16 -07:00
Chris Robinson
e44229c74e
Clamp the ALSA period time between min and max if setting near fails
2012-05-08 01:23:53 -07:00
Chris Robinson
92827cc467
Clamp the ALSA buffer time between min and max if setting near fails
...
It seems there's some bugs with snd_pcm_hw_params_set_buffer_time_near that
cause it to return "invalid argument" despite a valid nearby buffer time being
available. Clamping the buffer time seems to mitigate the issue a bit.
2012-05-07 11:42:59 -07:00
Chris Robinson
dd3d5bc2d4
Look for libsndio.so.2 instead of libsndio.so
2012-05-05 16:19:51 -07:00
Chris Robinson
010a66487d
Use 2 chained one-pole filters for the wet path
2012-04-30 09:33:00 -07:00
Chris Robinson
aed35fd811
Use ComputeAngleGains for multi-channel sources and remove the unused lookup table stuff
2012-04-29 05:04:46 -07:00
Chris Robinson
8d9838012d
Remove the stereodup option
...
There's better ways to do it now with "wide" sound sources.
2012-04-29 04:44:53 -07:00
Chris Robinson
57d36ec582
Fix a couple comment typos, and a minor cleanup
2012-04-29 03:39:08 -07:00
Chris Robinson
febc2a50cb
Use ComputeAngleGains for 3D sounds
2012-04-28 13:06:16 -07:00
Chris Robinson
74e128bd0f
Fix ComputeAngleGains
...
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.
2012-04-28 12:12:02 -07:00
Chris Robinson
c34d78f417
Use ComputeAngleGains for the echo and dedicated effects
2012-04-28 08:24:09 -07:00
Chris Robinson
611bd0b2d3
Add a method to calculate gains given a sound point and its half-width, and 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.
2012-04-28 08:21:53 -07:00
Chris Robinson
267d38cf20
Flip the parameters to aluCart2LUTpos, so it behaves a bit more like atan2
2012-04-28 03:58:58 -07:00
Chris Robinson
26456f13e1
Pass the direct/send params to the mixer instead of accessing through the source
2012-04-28 03:31:13 -07:00
Chris Robinson
2484c44db0
Apply the listener gain with the filter
2012-04-28 03:13:37 -07:00
Chris Robinson
a8a13fcbd8
Move the HrtfParams into the DirectParams
2012-04-28 02:23:53 -07:00
Chris Robinson
0a193c5645
Move the direct and send params into separate different types
2012-04-28 01:32:52 -07:00
Chris Robinson
2450ee1723
Use separate methods for the dry and wet mixing loops
2012-04-27 23:46:51 -07:00
Chris Robinson
67f1cdfcbe
Store the speaker angles in the device
2012-04-27 07:38:17 -07:00
Chris Robinson
549d542a31
Reorganize some ALsource fields
2012-04-27 01:36:13 -07:00
Chris Robinson
2cdb58fb85
The mixer always uses floats
2012-04-26 07:50:17 -07:00
Chris Robinson
68ab232364
Use a separate loop to actually update DataPosFrac and DataPosInt
2012-04-26 06:44:37 -07:00
Chris Robinson
5c70cacc13
Fixup some comments in ALu.c
2012-04-26 00:59:17 -07:00
Chris Robinson
648464a2da
Check the right playback device file with OSS
2012-04-22 05:06:44 -07:00
Chris Robinson
77f55da6c7
Use a macro to declare the function and enum list members
2012-04-20 22:38:03 -07:00