Commit Graph

23 Commits

Author SHA1 Message Date
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
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
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
a371de080b Silence some clang warnings 2013-06-05 01:52:49 -07: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
9501f1cb9e Define WIN32_LEAN_AND_MEAN when including windows.h in alMain.h 2012-10-06 21:36:15 -07:00
Chris Robinson
0f3a575a09 Don't include alu.h in alMain.h 2012-09-14 02:14:29 -07:00
Chris Robinson
37924887e8 Use a default method to provide a dummy latency 2012-08-19 12:31:59 -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
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
ac84d95c6e Silence some GCC warnings 2012-06-17 22:17:03 -07:00
Chris Robinson
259e4f5b38 Rename AllDevice -> AllDevices 2012-05-09 16:28:16 -07:00
Chris Robinson
5418519637 Remove some more hungarian notation 2012-04-19 23:00:58 -07:00
Chris Robinson
b023dbe7b8 Remove hungarian notation from the device and context structs 2012-04-19 22:50:11 -07:00
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
49433c2074 Slight correction for handling the wave writer backend's timer wrapping 2012-03-03 08:50:15 -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
60785eab8e Move the endian test macro to alMain.h 2012-02-15 21:47:35 -08:00
Chris Robinson
1140b3ae83 Support signed and unsigned 32-bit int output 2012-02-14 11:44:57 -08:00
Chris Robinson
c696d4dbb2 Return an ALC error enum from the OpenPlayback backend method 2011-08-24 14:24:48 -07:00
Chris Robinson
9989f33fc2 Move backend sources to a separate sub-directory 2011-08-20 00:41:47 -07:00