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

1617 Коммитов

Автор SHA1 Сообщение Дата
Paul Adenot dc519d1a30 Generate compile_commands.json while building 2023-08-25 10:41:03 -04:00
Paul Adenot ed15caf17a Handle input side 2023-08-25 10:41:03 -04:00
Paul Adenot b5cf41e60a Refactor conversion and format setting logic 2023-08-25 10:41:03 -04:00
Paul Adenot fcf47ed41a OpenSLES and related file: clang-format 2023-08-25 10:41:03 -04:00
Paul Adenot c40c5e0af7 OpenSLES: clang-format 2023-08-25 10:41:03 -04:00
Paul Adenot 070d1f0ae6 OpenSLES: Fix most clang-tidy warnings 2023-08-25 10:41:03 -04:00
Paul Adenot 4f162a7da3 OpenSLES: when floats IO aren't supported, perform a conversion 2023-08-25 10:41:03 -04:00
Paul Adenot da8a40a412 OpenSLES: use cubeb logging facilities 2023-08-25 10:41:03 -04:00
Paul Adenot f0edbd932d OpenSLES: compile as C++ 2023-08-25 10:41:03 -04: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
Paul Adenot 9517d4e837 Install virtual audio devices on Windows runners, enable microphone permission globally 2023-04-26 14:28:46 +02:00
Paul Adenot d3820eb365 clang-format cubeb_winmm.c 2023-04-26 14:28:46 +02:00
Paul Adenot aa05a1380e Attempt enabling test on gh action windows, also run the winmm backend 2023-04-26 14:28:46 +02:00
Paul Adenot af5e9f1211 Add some logging messages to winmm to ease debugging and make the logging test pass 2023-04-26 14:28:46 +02:00
Paul Adenot 31fb25d7eb Handle a negative return value from the user callback 2023-04-26 14:28:46 +02:00
Paul Adenot 6442216760 Change the WinMM backend so that it doesn't call the user callback during initialization 2023-04-26 14:28:46 +02:00
aeiouaeiouaeiouaeiouaeiouaeiou 3981f4a7ec Re-enable the test job on macOS CI 2023-04-23 12:54:56 +12:00
Paul Adenot 3ecf0c8f83 Sync back BMO#1825328
https://bugzilla.mozilla.org/show_bug.cgi?id=1825328 landed in Firefox
without going through upstream. It's necessary to build in an
environment where gtests are all compiled in the same executable.

Original patch by serge-sans-paille <sguelton@mozilla.com>.
2023-04-20 14:07:44 +02:00
Paul Adenot 479f8c5dec Don't spin when waiting for streams to be stopped. 2023-04-19 13:37:43 +02:00
Paul Adenot 55893cfa16 When an error happens, wait for the streams to be stopped before dispatching the error callback 2023-04-19 13:37:43 +02:00
Paul Adenot 3f45761b4f Add a way to know if the data callback is running 2023-04-19 13:37:43 +02:00
Paul Adenot 2840590aff Fix formatting warning 2023-04-19 13:37:43 +02:00
Paul Adenot 964a31b0fc Rename shutdown to shutdown_with_error got better convey the meaning 2023-04-19 13:37:43 +02:00
Matthew Gregan 2071354a69 opensl: Attempt to avoid a race with active callbacks during shutdown.
Based on examining crash dumps and investigating OpenSL workarounds in
liboboe, there is a potential race between active buffer callbacks and
stream shutdown, resulting in a buffer callback attempting to use a new
buffer after stream destroy has freed the backing allocation.

Ideally there would be a concrete event to watch for to ensure the
last callbacks have completed before destroying the stream, but I'm not
aware of one and the existing workaround in liboboe relies on an
arbitrary ("long enough") sleep between stopping and destroying streams.
2023-03-22 09:02:06 +13:00
Ryo ONODERA 63c148f602 On NetBSD, define _NETBSD_SOURCE for timersub() 2023-03-21 13:01:46 +13:00
Paul Adenot 70b4e3db78 format cubeb_sndio.c 2023-02-01 15:54:51 +01:00
Alexandre Ratchov 0846b39f1f sndio: switch audio to 24-bit precision 2023-02-01 15:54:51 +01:00
Macdu 88585b669b cmake: Make undefined symbols weak on Android 2023-01-27 13:07:18 +01:00