aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/jack.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make and use a bit_cast functionChris Robinson2023-05-041-2/+3
| | | | Instead of reinterpret_casting between incompatible types
* Use macros for the likely/unlikely attributesChris Robinson2023-03-011-2/+2
| | | | | The syntax parser for GCC 8 (and earlier?) fails when these attributes are in certain places.
* clang-tidy cleanups (#800)Rosen Penev2023-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * clang-tidy: use bool literals Found with modernize-use-bool-literals Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: replace std::bind with lambdas Found with modernize-avoid-bind Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: use data() instead of pointer stuff Found with readability-container-data-pointe Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: use empty() Found with readability-container-size-empty Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: remove static in anon namespace Found with readability-static-definition-in-anonymous-namespace Signed-off-by: Rosen Penev <[email protected]> * clang-tidy: remove const return Found with readability-const-return-type Signed-off-by: Rosen Penev <[email protected]> Signed-off-by: Rosen Penev <[email protected]>
* Don't explicitly try to spawn servers by defaultChris Robinson2023-01-141-1/+1
|
* Avoid extraneous temporaries when filling vectorsChris Robinson2022-12-151-4/+9
|
* Avoid using a macro to wrap standard attributesChris Robinson2022-12-061-2/+2
|
* Avoid LIKELY/UNLIKELY macrosChris Robinson2022-12-051-2/+2
|
* Simplify connecting JACK portsChris Robinson2021-07-251-13/+11
|
* Use a unique_ptr to auto-free the jack ports listChris Robinson2021-06-121-20/+24
|
* Set the JACK output ports as terminalChris Robinson2021-06-121-1/+1
| | | | Since there are no input ports associated with the output.
* Give a name to a lambdaChris Robinson2021-06-111-7/+7
|
* Improve name duplication handling with JACKChris Robinson2021-06-101-26/+63
| | | | | If a custom device pattern matches an existing one, its name will be replaced. A separate loop is used to check and handle duplicate display names.
* Add an option to mix directly in the JACK callbackChris Robinson2021-06-081-31/+80
|
* Update include headersChris Robinson2021-04-271-4/+4
| | | | Don't add alc/ to the include paths.
* Use the DeviceBase for the backendChris Robinson2021-04-241-2/+2
|
* Move helpers.cpp to coreChris Robinson2021-04-221-1/+1
|
* Allow calling BackendBase::open multiple times on playback devicesChris Robinson2021-03-081-15/+16
| | | | | | | | | | | 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.
* Add enumeration to the JACK backendChris Robinson2021-02-131-35/+84
| | | | | | | | Port names seem to be structured as <device_name:channel_name> or <app_name:channel_name>. I'm not sure if this is always the case, but it seems some other apps expect something like this. Also fix the port selection to exclude MIDI ports and allow non-physical ports.
* Remove an unnecessary semicolonChris Robinson2021-01-221-1/+1
|
* Move alexcpt to coreChris Robinson2020-12-241-1/+0
|
* Avoid AL/ALC types in the backendsChris Robinson2020-12-171-10/+10
|
* Don't use ALC error enums for the backend error codeChris Robinson2020-12-171-7/+9
|
* Move logging to coreChris Robinson2020-12-171-1/+1
|
* Allow JACK to enumerate custom devicesChris Robinson2020-09-101-4/+75
| | | | Each device being associated with a port name pattern it'll try connecting to.
* Change a couple functions into member functionsChris Robinson2020-08-071-2/+2
|
* Add an option to auto-connect JACK portsChris Robinson2020-08-051-11/+14
|
* Use std::array instead of some C-style arraysChris Robinson2020-08-051-23/+22
|
* Move a couple related functions to the backend baseChris Robinson2020-06-121-1/+1
|
* Don't return a bool from the backend start methodChris Robinson2020-04-281-15/+8
|
* Use standard attribute declarationsChris Robinson2020-04-131-0/+1
|
* Clean up some more unnecessary uses of AL typesChris Robinson2020-04-081-1/+1
|
* Get rid of a redundant enumChris Robinson2020-03-301-3/+3
|
* Return the enumerated device names from the backendChris Robinson2020-03-301-8/+9
| | | | Rather than using an out parameter.
* Remove the mutex from the backend baseChris Robinson2020-03-291-2/+4
|
* Avoid AL[C]boolean for internal useChris Robinson2020-03-281-5/+5
|
* Remove unnecessary locks now that the mixer doesn't require oneChris Robinson2020-02-261-4/+2
|
* Fix JACK process callback handlingChris Robinson2020-01-121-50/+48
| | | | | | The callback apparently can't be set after activation, but we can't allocate the ring buffer until after activation when the callback is already getting called. An ugly flag it is, then, I guess.
* Don't allocate the ring buffer for JACK before activationChris Robinson2020-01-111-32/+20
| | | | | | | | | | | | | | It seems the JACK server can send buffer size change events during device reset and wait on it, which causes a failure since the change event can't be processed during a reset. It's otherwise impossible to safely disable the change event callback during a reset since the lock is already held and the callback can be waiting to acquire it. The only guarantee we seem to have is the event callback won't be invoked after jack_activate succeeds. So instead, the buffer size can be queried after jack_activate and the ring buffer allocated then, instead of using an event callback. This does mean the buffer size can change with a start() call, but it's better than a failure to start.
* Make CreateRingBuffer a static RingBuffer methodChris Robinson2020-01-101-2/+2
|
* Handle padding between device sample framesChris Robinson2019-12-211-2/+4
| | | | | | | | 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.
* Make C callbacks noexceptChris Robinson2019-10-091-6/+6
| | | | | No telling what would happen if exceptions managed to get back into presumably C-based callers.
* Never return null from CreateRingBufferChris Robinson2019-10-081-10/+1
| | | | | Allocation failure would already throw a bad_alloc anyway, now a size overflow throws an exception too.
* Clean up some exception messages and avoid duplicate log messagesChris Robinson2019-10-081-4/+2
|
* Avoid raw lock/unlock callsChris Robinson2019-10-071-6/+4
|
* Use exceptions for backend open failuresChris Robinson2019-10-071-13/+10
|
* Return and pass more appropriate types for backendsChris Robinson2019-09-151-11/+11
|
* Return unsigned values from the FromDevFmt functionsChris Robinson2019-09-131-7/+5
|
* Move the dynload decls and defs to commonChris Robinson2019-08-101-1/+1
|
* Rename Alc to alcChris Robinson2019-07-281-0/+562