Chris Robinson
a9cce5de3e
Add a lockless ringbuffer
...
Largely copied from JACK, it's extended to work with user-specified element
sizes instead of bytes. This is necessary to be able to work with 6- and 7-
channel output modes.
2014-12-23 20:17:34 -08:00
Chris Robinson
6ccf10bbde
Don't set unused pointers to NULL, don't try to write 0 samples
2014-12-23 11:56:55 -08:00
Chris Robinson
e84b3f4707
At least measure the ringbuffer size for JACK's latency
...
We should also add the port latency, but there's currently no way to ensure
it's synchronized with the ringbuffer (the ringbuffer will update before the
port latency gets updated).
2014-12-23 11:42:57 -08:00
Chris Robinson
beb670a939
Add an option to prevent spawning a JACK server
2014-12-22 19:29:55 -08:00
Chris Robinson
5e189624b7
Add JACK to the config utility
2014-12-22 18:56:15 -08:00
Chris Robinson
b8d98dd6d0
Add an option for an increased ringbuffer size with JACK
2014-12-22 18:48:54 -08:00
Chris Robinson
7e6d0d6b4f
Fill out the JACK playback backend
...
A few notes about it:
The OpenAL device's requested buffer metrics are ignored, and instead the
device will keep one JACK-sized buffer's worth of audio prepared for JACK's
next process request.
Output is restricted to 32-bit float stereo. Part of this is because JACK
requires a buffer size that's a power of 2 (measured in samples), and the
ringbuffer requires a buffer size that's a power of 2 (measured in bytes). A
channel count of 6 (5.1) or 7 (6.1) will not work without causing a sample to
split over the edge of the ringbuffer. Additioanlly, JACK doesn't provide
information about what channel configuration a device or set of ports has, so
there's no way to know what ports 3 and up map to (even the first two ports are
unknown, but assuming stereo seems to work well enough).
There is no device latency measurement (for AL_SOFT_source_latency) due to the
non-atomicity between the ringbuffer's read size and port latency. A method is
needed to ensure the ringbuffer's read size and port latency can both be
measured between the end of a JACK update cycle (when the port latency has been
updated with the newly-retrieved audio) and the following ringbuffer read
update.
2014-12-22 13:30:35 -08:00
Chris Robinson
23197ddbc3
Add a skeleton backend for JACK
2014-12-21 15:51:16 -08:00
Chris Robinson
f2d59671b2
Add a cmake module to find JACK
2014-12-21 15:48:40 -08:00
Chris Robinson
b56d50912e
Set error if capture device fails to start
2014-12-21 12:46:04 -08:00
Chris Robinson
c2975b5f44
Trace lparam and wparam message values
2014-12-21 12:37:02 -08:00
Chris Robinson
a91bca64f8
Check the PROPVARIANT type before use
2014-12-21 12:20:31 -08:00
Chris Robinson
13092d94b7
Use VECTOR_FOR_EACH instead of a manual loop
2014-12-21 10:45:10 -08:00
Chris Robinson
28a9f0826c
Use a macro for the record thread name
2014-12-21 10:38:40 -08:00
Chris Robinson
6574fa4863
Cast to the pointer-to-type to increment the buffer
2014-12-21 09:48:36 -08:00
Chris Robinson
aa4cf99e63
Fix logging on Windows
2014-12-20 06:24:55 -08:00
Chris Robinson
abf0bd13ca
Support capture with mmdevapi
2014-12-19 15:49:37 -08:00
Chris Robinson
f300be00ae
Handle logging Unicode strings on Windows
2014-12-19 10:14:02 -08:00
Chris Robinson
7f696edf13
Set the right variable when assuming CPU extensions
2014-12-19 08:50:30 -08:00
Chris Robinson
c3a36d9b19
Do up to 256 samples at a time with multi-step loops
2014-12-18 09:23:55 -08:00
Chris Robinson
9897fca794
Inline a couple functions
2014-12-18 08:52:04 -08:00
Chris Robinson
13c2dd7115
Offset to the buffer's channel start first
2014-12-18 08:42:03 -08:00
Chris Robinson
94ad5b289f
Avoid duplicate calculations
2014-12-18 07:42:14 -08:00
Chris Robinson
6086c344dc
Assert that there's a buffer for mixing
...
For Clang's static analysis.
2014-12-17 10:57:35 -08:00
Chris Robinson
4b91d34d58
Set a couple pulse callbacks to NULL during reset, and minor cleanups
2014-12-17 10:10:28 -08:00
Chris Robinson
af193e9fb3
Don't kill pulseaudio's mixer thread if it's already killed
2014-12-17 09:47:58 -08:00
Chris Robinson
c37275efdc
Use aluVector and aluMatrix in a couple more places
2014-12-16 10:36:44 -08:00
Chris Robinson
c48a6196ad
Constify some variables
2014-12-16 09:20:35 -08:00
Chris Robinson
d2adefe063
Pass a vectory to aluMatrixVector
2014-12-16 07:42:17 -08:00
Chris Robinson
3b8f54d572
Use aluVector in some more places
2014-12-16 07:20:27 -08:00
Chris Robinson
97f6d302fe
Add explicit matrix and vector types to operate with
2014-12-16 06:29:31 -08:00
Chris Robinson
1b7c554068
Multiply samples with the cubic coeffs before transposing
...
This avoids having to transpose the cubic coefficients.
2014-12-15 17:13:31 -08:00
Chris Robinson
a0e7ad493b
Load samples with _mm_loadu_ps in the cubic SSE resamplers
2014-12-15 15:27:31 -08:00
Chris Robinson
177dd95686
Add SSE2 and SSE4.1 cubic resamplers
2014-12-15 13:58:41 -08:00
Chris Robinson
a606bbc7f1
Use a lookup table to do cubic resampling
2014-12-15 12:23:28 -08:00
Chris Robinson
4b77f4ef07
Transpose the cubic matrix op
2014-12-15 11:06:44 -08:00
Chris Robinson
e60e0761f5
Use the default channel layout in alffplay if one isn't specified
2014-12-12 06:10:23 -08:00
Chris Robinson
05529d66ae
Don't pass float literals for unsigned ints
2014-12-06 18:58:16 -08:00
Chris Robinson
3d1f1ffd7f
Fix a potential leak when opening a data file on Windows
2014-12-01 19:27:09 -08:00
Chris Robinson
0c74a14543
Remove IrSize from DirectParams
2014-11-29 03:32:25 -08:00
Chris Robinson
cf50f44f4d
Remove an unnecessary maxf()
2014-11-29 02:06:08 -08:00
Chris Robinson
6883619b14
Check mmdevice endpoint for being headphones
2014-11-27 17:43:37 -08:00
Chris Robinson
8d6d2e9a2b
Avoid unnecessary uses of ALCdevice_Lock and ALCdevice_Unlock
2014-11-27 15:27:43 -08:00
Chris Robinson
82780a703b
Set headphones when dsound reports headphones
2014-11-27 02:30:52 -08:00
Chris Robinson
1db8392344
Improve ambient gain calculations
2014-11-25 22:24:29 -08:00
Chris Robinson
bdbf6613ef
Support B-Format output with the wave file writer
2014-11-25 22:20:00 -08:00
Chris Robinson
be476b3729
Halve the gain of the Cube8 coefficients
2014-11-25 18:11:45 -08:00
Chris Robinson
0a3e11b75e
Fix reverb panning direction
2014-11-25 17:55:17 -08:00
Chris Robinson
aa231d25a7
Shorten a couple lines
2014-11-25 16:47:39 -08:00
Chris Robinson
efb5c5eecd
Use linear gain stepping
2014-11-25 02:08:48 -08:00