Chris Robinson
593966c8db
Handle 3D7.1 as a separate channel configuration
...
It's treated as 5.1 + 2 aux channels. This allows AL_DIRECT_CHANNELS_SOFT to
behave better, not forwarding rear left/right channel inputs to lower front and
upper rear, and allows reporting a more appropriate output mode to the app
instead of 7.1.
2022-04-26 23:32:15 -07:00
Chris Robinson
537aa2f442
Handle 5.1 using rear channels with PulseAudio and PipeWire
2022-01-25 21:18:39 -08:00
Chris Robinson
d0e5e138e2
Use a flag to indicate headphone-like output
2021-10-23 07:51:06 -07:00
Chris Robinson
29fba79cd5
Avoid 5.1Rear as its own channel configuration
...
It messes with 5.1 sources using direct channels, and the surround channels are
supposed to map to the side labels. Individual backends can deal with the
channel order/label differences, as they already do to a degree.
2021-07-30 07:38:26 -07:00
Chris Robinson
061148072f
Update include headers
...
Don't add alc/ to the include paths.
2021-04-27 16:04:54 -07:00
Chris Robinson
22a8ebff80
Move GetChannelIdxByName and clean up some more includes
2021-04-26 08:04:50 -07:00
Chris Robinson
581174ef98
Use the DeviceBase for the backend
2021-04-24 09:03:14 -07:00
Chris Robinson
d2f587ee23
Move helpers.cpp to core
2021-04-22 03:15:26 -07:00
Chris Robinson
f0154c4366
Move declarations to a more appropriate header
2021-04-22 03:00:05 -07:00
Chris Robinson
ccb1355cc8
Fill the PulseAudio buffer before uncorking playback
2021-04-19 04:42:28 -07:00
Ilya Fedin
b7ff1de48e
Don't force application name with pulseaudio
2021-03-18 04:34:57 +04:00
Chris Robinson
730c964029
Allow calling BackendBase::open multiple times on playback devices
...
It will not be called while the device is running. If the first call succeeds,
a subsequent call that happens to fail must leave the existing device state as
it was so it can be resumed.
This is a rough first pass. It will fail when trying to re-open the same device
which can only be opened once (for instance, with direct hardware access, on
hardware that doesn't do its own mixing). Some backends won't guarantee the new
device is usable until the reset() or start() call.
2021-03-08 22:29:40 -08:00
Chris Robinson
5ff5fd8ecc
Use a standard bitset for bitfield flags
2021-01-22 00:00:10 -08:00
Chris Robinson
8c4adfd752
Use a span instead of passing a vector by reference
2021-01-11 17:39:57 -08:00
Chris Robinson
1f01311ee3
Make sure proper names are used for querying PulseAudio info
2021-01-10 13:34:05 -08:00
Ilya Fedin
a30d3ad803
Pass nullptr to pulse for default device
2021-01-10 16:23:08 +04:00
Chris Robinson
eedc42890f
Move alexcpt to core
2020-12-24 22:49:55 -08:00
Chris Robinson
6ae0115bf7
Avoid AL/ALC types in the backends
2020-12-17 23:21:45 -08:00
Chris Robinson
5edd5a11fc
Don't use ALC error enums for the backend error code
2020-12-17 21:07:53 -08:00
Chris Robinson
4d1ac95ae2
Don't return an enum from captureSamples
...
It's always no_error
2020-12-17 03:06:52 -08:00
Chris Robinson
d578bc6cb1
Move logging to core
2020-12-17 02:47:03 -08:00
Chris Robinson
e8b3e82f96
Change a couple functions into member functions
2020-08-07 06:22:39 -07:00
Chris Robinson
39a2f0626a
Use a predicate instead of a while loop
2020-07-23 09:03:47 -07:00
Chris Robinson
c142b49981
Print the name of unhandled PulseAudio channels
2020-06-15 14:07:21 -07:00
Chris Robinson
6db6d1510a
Remove the Lower channel labels and rename the Upper labels
2020-06-15 13:49:45 -07:00
Chris Robinson
401a9bacd1
Don't bother with otherwise unused Aux channels
2020-06-15 02:27:29 -07:00
Chris Robinson
4094135ed7
Don't return a bool from the backend start method
2020-04-28 19:25:58 -07:00
Chris Robinson
02d7fbfa0c
Use standard attribute declarations
2020-04-13 23:27:56 -07:00
Chris Robinson
bf48dcd375
Report better latency when PulseAudio has no timing info
2020-03-30 20:06:24 -07:00
Chris Robinson
662d77159b
Get rid of a redundant enum
2020-03-30 16:00:02 -07:00
Chris Robinson
f2ddf971df
Return the enumerated device names from the backend
...
Rather than using an out parameter.
2020-03-30 15:37:41 -07:00
Chris Robinson
fb433cd918
Protect the call to pa_mainloop_quit with the mutex
2020-03-29 03:44:34 -07:00
Chris Robinson
a5b8167280
Make some functions private methods
2020-03-28 18:15:05 -07:00
Chris Robinson
f1f9a14172
Avoid AL[C]boolean for internal use
2020-03-28 18:15:05 -07:00
Chris Robinson
8731accd3f
Make sure prebuf is filled when starting pulseaudio playback
2020-03-27 01:03:01 -07:00
Chris Robinson
e73c0979a1
Use "zero-copy" writes with pulseaudio playback
2020-03-26 22:50:54 -07:00
Chris Robinson
ad98895876
Avoid a function call to get the channel count
2020-03-18 04:08:26 -07:00
Chris Robinson
7805179313
Rename a method to be clearer
2020-03-18 03:17:14 -07:00
Chris Robinson
54e2eafcc9
Make the pulseaudio enumeration functions class methods
2020-03-18 03:07:54 -07:00
Chris Robinson
9f077d5f41
Remove a couple unused methods
2020-03-18 02:35:31 -07:00
Chris Robinson
eb49290dab
Remove unnecessary locks now that the mixer doesn't require one
2020-02-26 04:58:02 -08:00
Chris Robinson
2e6a55a87c
Handle padding between device sample frames
...
The padding must be constant and sample type aligned (e.g. some fixed multiple
of two bytes between the start of two consecutive frames for 16-bit output).
The intent is to always have the ability for stereo output with WASAPI even if
the device has some other unsupported configuration, as long as front-left and
front-right exist.
2019-12-21 20:43:46 -08:00
Chris Robinson
d2053e6784
Use one PulseAudio mainloop per device
...
To help avoid devices blocking on each other when handling asynchronous
messages.
2019-10-09 23:25:56 -07:00
Chris Robinson
8bf3da0cd2
Remove a useless prebuf check with PulseAudio
2019-10-09 09:45:02 -07:00
Chris Robinson
57cdac3368
Create the initial PulseAudio stream corked
2019-10-09 09:42:35 -07:00
Chris Robinson
404f3e2d08
Don't track the PulseAudio context state in devices
2019-10-09 05:01:30 -07:00
Chris Robinson
b687e952ef
Make C callbacks noexcept
...
No telling what would happen if exceptions managed to get back into presumably
C-based callers.
2019-10-09 03:29:25 -07:00
Chris Robinson
7726a06d26
Clean up some exception messages and avoid duplicate log messages
2019-10-08 05:44:38 -07:00
Chris Robinson
360330b2ad
Define some simple wrapper methods inline
2019-10-08 03:41:49 -07:00
Chris Robinson
9b411cfcbe
Reduce some indentation
2019-10-07 22:25:45 -07:00