105 Commits

Author SHA1 Message Date
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
Chris Robinson
9f0e49917d Add default handlers for reset, captureSamples, and availableSamples 2013-10-29 15:07:13 -07:00
Chris Robinson
779eb4b82b Convert the PulseAudio backend to the new interface 2013-10-29 14:44:07 -07:00
Chris Robinson
f24cb44781 Move the device mutex to the backend 2013-10-28 12:05:33 -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
32e85d469b Use the UNUSED macro in the backends 2013-10-07 08:00:18 -07:00
Chris Robinson
9ee3d01f6e Use a simpler U64 macro to make 64-bit constants 2013-10-06 04:21:03 -07:00
Chris Robinson
01a5946a2e Compile using -std=c99 when available 2013-10-03 05:45:12 -07:00
Chris Robinson
f1b0f67553 Build an appropriate channel map for PulseAudio 2013-02-08 18:59:48 -08:00
Chris Robinson
209d09ae13 Avoid locking PulseAudio's mainloop when starting and stopping capture
The mainloop is already locked by the caller, and double-locking interferes
with the subsequent wait.
2012-11-19 16:50:03 -08:00
Chris Robinson
84f4afa5f2 Lock the device using the pulseaudio main loop 2012-10-07 02:25:59 -07:00
Chris Robinson
468759e6ab Scale and round NumUpdates when PulseAudio changes the sample rate 2012-10-04 23:36:59 -07:00
Chris Robinson
b5d9d8e005 Reset maxlength if PulseAudio updates the playback rate 2012-10-02 17:01:35 -07:00
Chris Robinson
012e61b105 Round when calculating NumUpdates from PulseAudio's minreq 2012-09-25 11:32:49 -07:00
Chris Robinson
52d403b0d1 Make sure PulseAudio sets an update size that's a multiple of 4 samples with SSE 2012-09-20 15:01:49 -07:00
Chris Robinson
0f3a575a09 Don't include alu.h in alMain.h 2012-09-14 02:14:29 -07:00
Chris Robinson
f5e0500df4 Add a macro to help make a 64-bit value 2012-08-19 22:31:55 -07:00
Chris Robinson
0db7c4131b Hold the device lock with PulseAudio between mixing and writing 2012-08-18 17:20:20 -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
f42f655ea9 Don't unlock the pulseaudio mainloop when mixing
Lock contention could cause a lengthy delay between mixing and writing the
audio. There shouldn't be any risk of dead-locking as the device lock should
never be held when the mainloop gets locked.
2012-08-12 03:52:38 -07:00