Chris Robinson
d4f3490a88
Limit device buffer based on PulseAudio's tlength
...
Unfortunately PulseAudio has a habit of limiting tlength, and trying to
calculate the device's buffer length to write regardless of tlength could
result in some amount always being writable.
2017-06-15 21:39:09 -07:00
Chris Robinson
a49e2ebbc5
Add an env var to specify a default pulse device
...
Some apps don't allow selecting an audio device, and due to problems with KDE,
PulseAudio isn't allowed to move the stream after being created by default.
2017-05-16 16:50:43 -07:00
Chris Robinson
901804d724
Store the ambisonic order separate from the channel enum
2017-04-12 18:26:07 -07:00
Chris Robinson
5ef7d8fe62
Clean up some formatting
2017-04-08 12:27:30 -07:00
Chris Robinson
1f64f9d016
Try to write the full configured buffer length with PulseAudio
...
This basically ignores tlength even if it's smaller than what was requested. It
keeps up-to-date with minreq changes too now, in case that happens.
2017-04-08 10:01:04 -07:00
Chris Robinson
26144ca9df
Rename al_string_* functions to alstr_*
2017-04-04 06:58:53 -07:00
Chris Robinson
e0e6efbfea
Print warnings about missing libraries and functions
2017-02-21 10:17:48 -08:00
Chris Robinson
e20f0ae5a3
Hold Pulse's mainloop lock while calling capture functions
...
Since commit c837484015e, the backend's lock is no longer implicitly held when
calling capture functions. A separate mutex is used to ensure serial access,
and its up to the backend to protect against races and reentrancy with the
audio API.
2017-01-10 03:02:26 -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
8145a26d07
Add a hack to workaround erroneous prebuf values from pulse
2016-03-31 16:21:49 -07:00
Chris Robinson
9891d61206
Add options to disable Pulse's and ALSA's resamplers
2015-11-07 23:05:45 -08:00
Chris Robinson
703f1fdec2
Specify the pa_channel_map directly instead of through a string
2015-09-04 23:59:24 -07:00
Chris Robinson
ce487d1e43
Use the correct device name for PulseAudio too
...
Like mmdevapi. duplicate device names will have a '#2 ' or such appended, so the
device's reported name may be incorrect.
2015-09-03 14:59:59 -07:00
Chris Robinson
e5fa4ee25d
Allow for device-specific config values
2015-08-28 14:10:39 -07:00
Chris Robinson
f6e52debb5
Fix handling of PulseAudio devices that have the same description
2015-08-14 19:05:16 -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
290badea95
Ensure PulseAudio's mixing loop is signaled when stopping
2015-01-21 22:02:02 -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
bdbf6613ef
Support B-Format output with the wave file writer
2014-11-25 22:20:00 -08:00
Chris Robinson
cbe22763ee
Require at least pulse client 0.9.16
2014-11-24 13:15:04 -08:00
Chris Robinson
fc00c1c009
Trace PulseAudio's active port
2014-11-24 12:45:51 -08:00
Chris Robinson
2c533fdc36
Set headphones when pulse reports using the headphones port
2014-11-23 20:41:29 -08:00
Chris Robinson
1dcc54c986
Don't force UpdateSize to a multiple of 4 after buffer metrics were set
2014-11-17 21:23:29 -08:00
Chris Robinson
40a08bed4f
Always get the pulseaudio sink info on device reset
2014-11-17 17:57:52 -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
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
f173a67870
Use VECTOR_FIND_IF and VECTOR_FOR_EACH instead of manual loops
2014-08-09 06:15:11 -07:00
Chris Robinson
6864053eee
Use pulseaudio's write callback to signal a mixer proc wakeup
2014-07-26 22:04:26 -07:00
Chris Robinson
d0a64fe191
Don't require pre-declaring vector types
2014-07-06 03:27:39 -07:00
Chris Robinson
fd5e7f1466
Don't print an ERR if pulse fails to get latency info due to no data
...
It just means it was called too quickly after starting.
2014-05-26 03:41:33 -07:00
Chris Robinson
fdcdda2ed3
Initialize a pointer to NULL instead of a string
2014-05-15 01:39:42 -07:00
Chris Robinson
f150676873
Add a helper VECTOR_FOR_EACH macro
2014-04-30 12:30:02 -07:00
Chris Robinson
7dd4a2348f
Use a helper function to clear PulseAudio device lists
2014-04-24 01:38:24 -07:00
Chris Robinson
8fd224f841
Avoid forward-declaring backend vtables
2014-04-23 03:52:05 -07:00
Chris Robinson
ad71565e45
Trace the device name being opened in ALSA and PulseAudio
2014-04-21 20:26:29 -07:00
Chris Robinson
5215b9cad2
Use a vector for the PulseAudio DevMaps
2014-04-20 06:29:36 -07:00
Chris Robinson
b435a8e01b
Use an al_string in the PulseAudio backend instead of char*
2014-04-20 05:55:52 -07:00
Chris Robinson
36df67f546
Rename SetThreadName to althrd_setname
2014-04-17 20:41:32 -07:00
Chris Robinson
b020dd13fd
Avoid using a Sleep() wrapper
2014-04-16 06:59:44 -07:00
Chris Robinson
18ab9cbbdd
Implement a C11-like thread wrapper and use it in mmdevapi and pulseaudio
2014-04-16 05:19:34 -07:00
Chris Robinson
7b93e10f7a
Use an al_string for the device name
2014-03-28 22:11:34 -07:00
Chris Robinson
d8bfd12d31
Use a void* for the backend Delete method param
2014-03-22 00:28:55 -07:00
Chris Robinson
ea8a85b19c
Move PATH_MAX fallback definitions to alMain.h
2014-02-27 18:17:20 -08:00
Chris Robinson
3d921e0e6f
Make backend factory methods static as needed
2013-11-02 16:35:05 -07:00
Chris Robinson
90a51d7897
Move a macro definition up nearer to where it's used
2013-10-29 23:54:10 -07:00