69 Commits

Author SHA1 Message Date
Chris Robinson
03274a5b95 Ensure at least the specified ringbuffer size is writable
Previously, all but one of the specified size could be written (so for a size
of n, only n-1 was guaranteed writable). All users pretty much compensated for
this, but it makes more sense to fix it at the source.
2018-03-02 13:01:11 -08:00
Chris Robinson
6f62fed65c Add an option to limit the write size of the ringbuffer 2018-03-01 21:23:13 -08:00
Chris Robinson
9b878c64f9 Make the Connected state atomic
Also don't send the Disconnected event more than once.
2018-02-04 00:01:12 -08:00
Chris Robinson
e7217760f3 Don't bother with an explicit stop backend method 2018-01-29 01:00:53 -08:00
Chris Robinson
a042dbf305 Call the backend close method in the destructor 2018-01-28 23:32:28 -08:00
Chris Robinson
2873abcbc0 Fix up some types for MSVC 2018-01-11 10:55:35 -08:00
Chris Robinson
3832b25f30 Move the ringbuffer declarations to a separate header
And rename alcRing.c to ringbuffer.c for consistency.
2018-01-11 09:16:28 -08:00
Chris Robinson
901804d724 Store the ambisonic order separate from the channel enum 2017-04-12 18:26:07 -07:00
Chris Robinson
26144ca9df Rename al_string_* functions to alstr_* 2017-04-04 06:58:53 -07:00
Chris Robinson
247f56249a Always lock the device backend before calling aluMixData 2017-02-18 17:32:07 -08:00
Chris Robinson
bff5268ed4 Remove DevFmtBFormat3D, which is covered by DevFmtAmbi1 2016-07-31 08:13:41 -07:00
Chris Robinson
b5b3ea95f8 Add a config to output first-, second-, or third-order ambisonics
Currently incomplete, as second- and third-order output will not correctly
handle B-Format input buffers. A standalone up-sampler will be needed, similar
to the high-quality decoder.

Also, output is ACN ordering with SN3D normalization. A config option will
eventually be provided to change this if desired.
2016-07-29 21:55:43 -07:00
Chris Robinson
5e11a738c6 Combine VECTOR_RESIZE and VECTOR_RESERVE 2016-07-26 12:02:03 -07:00
Chris Robinson
6d4380a48c Change the backend getLatency method to return the clock time too
This will also allow backends to better synchronize the tracked clock time with
the device output latency, without necessarily needing to lock if the backend
API can allow for it.
2016-05-28 00:43:14 -07:00
Chris Robinson
f4ff5fc106 Shorten VECTOR_ITER_ macros to VECTOR_ 2016-04-15 12:22:54 -07:00
Chris Robinson
d6163fe570 Convert remaining ringbuffers to the lockless variant 2016-03-29 23:48:36 -07:00
Chris Robinson
e45ff47361 Reformat Windows device name dressing 2015-12-04 15:52:43 -08:00
Chris Robinson
70fbc2b1ff Add a function to get a list of data files
The method takes a marked-up filename (e.g. may include %r for a sample rate,
%% for %, etc), and returns a vector of strings of found filenames that match.
It will search the CWD, the local, and global data directories, in that order.
2015-10-03 20:41:18 -07:00
Chris Robinson
87f3babe2c Append "on OpenAL Soft" to mmdevapi, dsound, and winmm device names
Would be nicer to have a more backend-agnostic method of doing this, Perhaps
even also only when the router is being used.
2015-09-10 22:15:40 -07:00
Chris Robinson
9f49ac0fda Add a macro to simplify allocating and constructing an object 2015-05-18 16:39:44 -07:00
Chris Robinson
28a9f0826c Use a macro for the record thread name 2014-12-21 10:38:40 -08:00
Chris Robinson
bdbf6613ef Support B-Format output with the wave file writer 2014-11-25 22:20:00 -08:00
Chris Robinson
0051a96376 Fix 5.1 surround sound
Apparently, 5.1 surround sound is supposed to use the "side" channels, not the
back channels, and we've been wrong this whole time. That means the "5.1 Side"
is actually the correct 5.1 setup, and using the back channels is anomalous.

Additionally, this means the 5.1 buffer format should also use the the side
channels instead of the back channels.

A final note: the 5.1 mixing coefficients are changed so both use the original
5.1 surround sound set (with the surround channels at +/-110 degrees). So the
only difference now between 5.1 "side" and 5.1 "back" is the channel labels.
2014-11-07 00:54:16 -08:00
Chris Robinson
9dacd89a02 Convert the winmm backend to the new backend API 2014-09-08 06:46:20 -07:00
François Cami
3c13e1e333 Update COPYING to the latest https://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt to fix the FSF' address Fix the FSF' address in the source 2014-08-18 11:34:29 -07:00
Chris Robinson
d0a64fe191 Don't require pre-declaring vector types 2014-07-06 03:27:39 -07:00
Chris Robinson
1d2504d12e Make RefCount a non-integer type
It should only be accessed through the appropriate functions to ensure proper
atomicity.
2014-05-14 02:47:07 -07:00
Chris Robinson
f150676873 Add a helper VECTOR_FOR_EACH macro 2014-04-30 12:30:02 -07:00
Chris Robinson
a4cf378af8 Use a helper method to clear winmm device lists 2014-04-24 01:25:26 -07:00
Chris Robinson
9af8e10c20 Avoid using superfluous LP* types 2014-04-23 10:08:33 -07:00
Chris Robinson
0b527621a5 Use a RefCount for counting committed winmm buffers 2014-04-23 05:08:17 -07:00
Chris Robinson
ca1008571e Use the althrd methods in winmm 2014-04-21 09:35:17 -07:00
Chris Robinson
dbe0897c7f Use the stored format block align instead of calculating it 2014-04-20 22:29:54 -07:00
Chris Robinson
36df67f546 Rename SetThreadName to althrd_setname 2014-04-17 20:41:32 -07:00
Chris Robinson
1290f37750 Silence an MSVC warning about -1u 2014-04-07 13:55:22 -07:00
Chris Robinson
4f1104125b Use an al_string vector for winmm device names
Also now gets wchar device names, to properly convert to UTF-8
2014-04-07 12:43:19 -07:00
Chris Robinson
7b93e10f7a Use an al_string for the device name 2014-03-28 22:11:34 -07:00
Chris Robinson
80ea801204 Add a macro for GCC to ensure stack alignment 2013-11-25 17:29:39 -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
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
32e85d469b Use the UNUSED macro in the backends 2013-10-07 08:00:18 -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
259e4f5b38 Rename AllDevice -> AllDevices 2012-05-09 16:28:16 -07:00
Chris Robinson
cff0f938e5 Remove hungarian notation from the winmm backend 2012-04-19 23:22:11 -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