790 Commits

Author SHA1 Message Date
Chris Robinson
fe6e532c87 Use a separate backend callback to start playback of the device
This allows us to properly update the ALCdevice and its resources with the new
parameters before starting playback, instead of expecting the mixer to block
and wait after it has begun.

This also lets us avoid holding the device lock while resetting and starting
the device, which helps prevent lock inversion on some backends (ie, one thread
locking A then B, and another thread locking B then A), ultimately allowing
certain backends to asynchronously update the ALCdevice without risk of lockup.
Capture still has issues here, however.
2012-03-05 07:11:09 -08:00
Chris Robinson
50ef19720d Make alcLoopbackOpenDeviceSOFT take a standard "device" name for a parameter 2012-03-01 08:30:21 -08:00
Chris Robinson
8d24bd720f Don't use GUIDs to ID mmdevapi devices, and don't enumerate if not needed 2012-03-01 06:07:00 -08:00
Chris Robinson
504cdadd60 Use an enum for the device type 2012-02-23 15:25:30 -08:00
Chris Robinson
45c10229d9 Print a message when loading the "none" reverb preset 2012-02-23 13:49:46 -08:00
Chris Robinson
e2ccc6f98e Always use "OpenAL Soft" for the short device enumeration list 2012-02-20 20:45:22 -08:00
Chris Robinson
799f8da333 Recognize "none" to disable the default reverb 2012-02-19 17:41:42 -08:00
Chris Robinson
418c766493 Use memset to clear the bs2b filter's last sample and remove the unused is_clear function 2012-02-19 13:09:29 -08:00
Chris Robinson
4a65747a4b Add a COUNTOF macro to get the number of entries in a static array 2012-02-19 12:07:40 -08:00
Chris Robinson
cc2cb1142b Remove unused variables 2012-02-17 12:32:43 -08:00
Chris Robinson
84ba0a94c0 Make sure the source write position is at least 15ms ahead of the read 2012-02-16 00:11:50 -08:00
Chris Robinson
60785eab8e Move the endian test macro to alMain.h 2012-02-15 21:47:35 -08:00
Chris Robinson
6b272ff585 Add a device parameter to alcLoopbackOpenDeviceSOFT 2012-02-15 20:52:49 -08:00
Chris Robinson
fecd679f33 Add a device request flag for the sample type 2012-02-15 16:26:32 -08:00
Chris Robinson
2ab0e3521c Remove parameter names from typedefs 2012-02-15 15:23:23 -08:00
Chris Robinson
670c88a64c Define a minimum output sample rate and warn if the config option goes below it 2012-02-15 12:26:19 -08:00
Chris Robinson
1140b3ae83 Support signed and unsigned 32-bit int output 2012-02-14 11:44:57 -08:00
Chris Robinson
e394d14cda Use more proper enum names for the resampler 2012-02-12 08:45:19 -08:00
Chris Robinson
9f073b6f1b Use a proper enum value for setting the default distance model 2012-02-12 08:18:20 -08:00
Chris Robinson
ef68aa39f8 Rename non_virtual_channels to direct_channels 2012-02-09 23:35:17 -08:00
Chris Robinson
a98e381c8e Ensure ALbyte3 and ALubyte3 are the proper size 2012-02-07 08:05:01 -08:00
Chris Robinson
47161150d7 Check for a 32-bit x86 processor before using MSVC's asm intrinsics 2012-02-03 19:34:06 -08:00
Chris Robinson
8e6832407a Only use fast float-to-int GCC assembly for x86 and x86_64 targets 2012-02-03 17:40:21 -08:00
Chris Robinson
9166432ccf Fix typo in the "CarpetedHallway" reverb preset 2012-02-01 16:31:37 -08:00
Chris Robinson
ed037698fd Reorder a couple effect presets 2012-01-29 22:16:39 -08:00
Chris Robinson
706f407ed5 Add some more reverb presets 2012-01-27 23:15:16 -08:00
Chris Robinson
3fda804217 Pass the uncompressed sample count to LoadData and ConvertData for IMA4 2012-01-26 16:53:21 -08:00
Chris Robinson
b4ba83ec34 Avoid a bit of code duplication 2012-01-25 19:32:10 -08:00
Chris Robinson
8d07bc41c9 Some cleanups for the reverb list 2012-01-24 13:29:33 -08:00
Chris Robinson
f520257463 Avoid duplicating some initialization code 2012-01-20 16:23:15 -08:00
Chris Robinson
00dc3088c8 Honor the disabled effects for the default reverb 2012-01-20 15:56:32 -08:00
Chris Robinson
37b17c8c78 Add the ability to specify a preset for forced reverb 2012-01-19 20:02:57 -08:00
Chris Robinson
51e81f4867 Add a global option to apply a reverb effect on source send 0
A special slot on the device is created and processed, so it can be shared
across all contexts on the device. Sources that don't have a slot set on send 0
will use this special slot instead.
2012-01-19 19:30:03 -08:00
Chris Robinson
e772fb7d0e Finalize AL_SOFT_buffer_samples 2012-01-10 01:14:02 -08:00
Chris Robinson
29ba8f9f1a Remove the unnecessary AL_MULAW_SOFT, AL_ALAW_SOFT, and AL_IMA4_SOFT defines 2012-01-10 00:59:10 -08:00
Chris Robinson
61af4d715c Append _SOFT to the AL_SOFT_buffer_samples enums 2012-01-10 00:41:05 -08:00
Chris Robinson
535091e36c Make LockDevice, LockContext, etc, inline 2012-01-09 23:37:03 -08:00
Chris Robinson
886f874ff3 Use a proper typedef for handling atomic pointer swaps 2012-01-01 15:00:03 -08:00
Chris Robinson
d270188578 Append _SOFT to the ALC loopback format enums 2011-11-01 16:00:47 -07:00
Chris Robinson
fcf9034c2b Calculate the listener matrix when a new orientation is specified
This is so the matrix isn't derived each time a source is updated, and it will
make supporting user-defined matrices easier.
2011-10-30 08:27:24 -07:00
Chris Robinson
a5c02556e6 Add a work-around for cross-compiling with MinGW 2011-10-27 21:22:00 -07:00
Chris Robinson
628356a294 Set AL_STOPPED after setting AL_PLAYING when a source has nothing to play 2011-10-15 10:33:30 -07:00
Chris Robinson
81133769de Return the key's value from the map when it's removed 2011-10-06 06:39:13 -07:00
Chris Robinson
a7d3779dfa Check for the HRTF object instead of a flag 2011-10-06 01:16:07 -07:00
Chris Robinson
75fee8c11f Add min/max/clamp methods for 64-bit int 2011-10-04 22:39:35 -07:00
Chris Robinson
eb277cc578 Remove some unneeded templates and parameters 2011-10-04 09:55:36 -07:00
Chris Robinson
20fd648729 Convert samples to float when copying to the stack 2011-10-04 09:47:08 -07:00
Chris Robinson
11caba9807 Use sample frames when handling the buffer length 2011-10-04 02:08:45 -07:00
Chris Robinson
7f5074949e Don't use inline asm with MSVC on 64-bit 2011-10-02 21:44:08 -07:00
Chris Robinson
cf10a8d321 Get rid of some unnecessary casting 2011-10-02 16:54:45 -07:00