Граф коммитов

1685 Коммитов

Автор SHA1 Сообщение Дата
Paul Adenot 625213fd9f Non-functional change: Check tests when checking format 2023-11-10 15:31:57 +01:00
Paul Adenot 687b1e3446 Non-functional change: clang-format tests 2023-11-10 15:31:52 +01:00
Paul Adenot 8b4721e51e Non functional change: fix unified compilation issue -- make callbacks static 2023-11-10 15:31:45 +01:00
Paul Adenot 6f0f147148 clang-format 2023-11-10 11:31:35 +01:00
Paul Adenot b32ab34399 Reset logging thread ID when starting a new stream to allow debugging comfortably 2023-11-10 11:31:35 +01:00
Paul Adenot 2dedf7b191 AAudio: set the callback size to the latency passed in, increase internal buffer size to be 3 times the burst size 2023-11-10 11:31:35 +01:00
Paul Adenot eb1293382e Add and modify a few logging statements 2023-11-10 11:31:35 +01:00
Paul Adenot b040f89681 AAudio: when finding that an input device has been disconnected, reinitialize the duplex stream 2023-11-10 11:31:35 +01:00
Paul Adenot 4b4d18a70f AAudio: remove unused header 2023-11-10 11:31:35 +01:00
Paul Adenot ce3645e65c Reset thread id when a new stream is created, in OpenSL backend
This is not 100% correct, but prevents crashing on an assert in the very
common case of opening multiple streams back to back with logging
enabled.
2023-11-10 11:31:35 +01:00
Paul Adenot 72ded59b4d Fix output buffer conversion: handle differing channel count between input and output 2023-11-10 11:31:35 +01:00
aeiouaeiouaeiouaeiouaeiouaeiou a0e8b8e49a CI: update actions/checkout to v4 2023-11-10 23:12:31 +13:00
Paul Adenot d07ea5aa66 Fix mistake break audio input on OpenSL ES 2023-11-08 14:42:49 +01:00
Andreas Pehrson 785a3ca155 In test_duplex loop back all input frames
The break removed here makes sense for input-only, where breaking has no
side effects. In a loopback duplex case like here it makes the callback
exit early, before having written all frames. This can be caused by
clipping on the input side (as observed on MacOS) and creates a
distortion that sounds terrible.
2023-11-07 12:04:32 +13:00
Paul Adenot 5f0d17373b AAudio: ensure input buffer is large enough when reading input data 2023-10-26 11:43:35 +02:00
Paul Adenot 75d5e6a040 Return an error if failing to open a recorder and it's not a sample-rate not supported issue 2023-10-24 11:11:47 +02:00
Paul Adenot f1bfefbbd4 Actually use the return value in initialize_with_format callback call. 2023-09-26 15:23:21 +13:00
Paul Adenot f9c118ddc0 Use uint64_t for the samplerate in opensl_stream_get_position to avoid overflow 2023-09-15 16:14:22 +02:00
Paul Adenot 3f86a06fce Generate compile_commands.json while building 2023-08-25 20:09:58 +02:00
Paul Adenot 46f10c2eea Handle input side 2023-08-25 20:09:58 +02:00
Paul Adenot ed468c2a47 Refactor conversion and format setting logic 2023-08-25 20:09:58 +02:00
Paul Adenot cd4effa91a OpenSLES and related file: clang-format 2023-08-25 20:09:58 +02:00
Paul Adenot 510266b364 OpenSLES: clang-format 2023-08-25 20:09:58 +02:00
Paul Adenot 4dfcbd32fd OpenSLES: Fix most clang-tidy warnings 2023-08-25 20:09:58 +02:00
Paul Adenot 714ac6e8db OpenSLES: when floats IO aren't supported, perform a conversion 2023-08-25 20:09:58 +02:00
Paul Adenot 13872fb5f1 OpenSLES: use cubeb logging facilities 2023-08-25 20:09:58 +02:00
Paul Adenot 33ade008b5 OpenSLES: compile as C++ 2023-08-25 20:09:58 +02:00
Paul Adenot ac8474a592 AAudio: Don't unlock a mutex owned by a lock_guard 2023-08-03 14:13:06 +02:00
Paul Adenot b9af56cee7 Don't attempt to use an unavailable cubeb_stream in aaudio_stream_init. 2023-07-31 11:50:04 +02:00
Paul Adenot 41344b3abb Update googletest to current master
This is what is recommended by upstream.
2023-07-26 14:02:22 +02:00
Paul Adenot af4769f18a Run clang-format 2023-07-26 14:02:22 +02:00
Paul Adenot cfd7bf22d6 Compile in C++17, like Gecko 2023-07-26 14:02:22 +02:00
Paul Adenot 31d6a2b0f2 AAudio: Fix log level when stopping a stream 2023-07-26 14:02:22 +02:00
Paul Adenot eef055ab21 AAudio: When a device is disconnected, reinitialize the stream with the same parameters 2023-07-26 14:02:22 +02:00
Paul Adenot 29d266e628 AAudio: Split init/destroy/start functions into an internal and external interface
This will allow calling those functions properly from an internal thread, and
simplify lock management. This will happen in a subsequent patch.

The initial parameter passed to cubeb_stream_init are now stored on the
cubeb_stream struct to be able to reinitialized properly (again in a subsequent
patch).

Since all those calls need have a lock held, the lock is passed as argument to
ensure thread safety. This ensures the caller of the internal functions has
taken the lock, and at the same time allows not unlocking/relocking the mutex if
a series of call is performed (that will be the case in a subsequent patch,
during reinitialization).

The boolean that marks that a stream is in use is modified in the external
interface, called by the user. A stream is marked as being in use when the user
initialize it, and is marked as not being in use when the user destroys it.
2023-07-26 14:02:22 +02:00
Paul Adenot 8ee7b799e2 AAudio: switch to using cubeb logging facilities 2023-07-26 14:02:22 +02:00
Paul Adenot c31bcf3159 Fix clang-tidy warnings in cubeb_log.cpp 2023-07-26 14:02:22 +02:00
Paul Adenot dfc128b053 AAudio: fix clang-tidy issues 2023-07-26 14:02:22 +02:00
Matthew Gregan 68084e902e wasapi: Flag cubeb_stream as inactive when stopped, avoid reconfiguring inactive streams from render thread. 2023-07-26 13:57:06 +02:00
Matthew Gregan 779f024958 wasapi: Take stream_reset_lock earlier in render thread reconfig path. 2023-07-26 13:57:06 +02:00
Paul Adenot 48689ae7a7 Remove incorrect code to adjust output queue capacity 2023-05-17 13:38:27 +02:00
Paul Adenot da01c85243 Run clang-format-15 on the codebase -- fix a single difference 2023-05-17 10:57:17 +02:00
Paul Adenot 5e12bb870d Allow specifying a particular clang-format binary (version), and pin the CI to version 15 2023-05-17 10:57:17 +02:00
Michael M febf49d089 wasapi: make render thread exist for the lifetime of the stream object
- Converts cubeb_stream into a reference-counted object, and gets rid of
  emergency_bailout logic
- When reconfiguring, only restart a stream if it was already started
- Removes timeout inside the render thread, as we can't guarantee events
  while a stream is stopped

Subsequently rebased by Paul Adenot <padenot@mozilla.com>
2023-05-17 10:57:17 +02:00
Paul Adenot 1ba9237364 Skip a couple more tests when a backend can't use audio input 2023-04-26 14:28:46 +02:00
Paul Adenot 88900545d4 Only run test_overload.cpp when using the WASAPI backend 2023-04-26 14:28:46 +02:00
Paul Adenot 0e7f41d6ef Don't run test_loopback and test_duplex on backends that can't open audio input 2023-04-26 14:28:46 +02:00
Paul Adenot d478bff5fb Don't wait in winmm_stream_destroy when the return value of the data callback is an error. 2023-04-26 14:28:46 +02:00
Paul Adenot 47720cbc03 Don't continue calling the data callback in the winmm backend if the user has returned a negative value 2023-04-26 14:28:46 +02:00
Paul Adenot 2e0fe89106 Prevent running test that make use of audio input streams on backends that don't implement it 2023-04-26 14:28:46 +02:00