aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2022-09-21Make the log callback and level atomiccubeb-log-atomicPaul Adenot
It's useful to be able to enable logging dynamically while the program is running, and this can now be done on any thread. Various threads are logging (directly or asynchronously via the ring buffer), it's better to have those atomic. Both values are always checked before logging, and both must be non-null to log.
2022-09-22Simplify initialization of opensl backendPaul Adenot
2022-09-21Null check `context` in cubeb_enumerate_devices.Matthew Gregan
2022-09-21cmake: fix install rulesAlexandre Bouvier
* don't install cmake test binaries * fix variable names in Doxyfile.in * install doc files
2022-09-06Remove comments after #endif to fix clang-format errors.ivan-matveev
2022-09-06Add #ifndef around dlclose() to allow build with "LAZY_LOAD_LIBS=OFF" cmake ↵ivan-matveev
argument.
2022-07-21Add logging statement when input audio dropping happensPaul Adenot
2022-07-21Add a header to be able to use a frame profiler in cubebPaul Adenot
The purpose of this header is to be swapped by cubeb users to use any number of frame profiler (tracy/Gecko Profiler/trace_event.h, etc.).
2022-07-19Don't print the file name and \n twice when logging asynchronously (#715)Paul Adenot
Not the prettiest but it does the job. Thanks to @ashleyz we don't really care about checking the log level here, it's checked ahead of time, which is nice because we don't want to carry it in the async log payload.
2022-07-18Check log level in asynchronous logging macros before printing (#714)az
Added `ALOG` macro and updated `ALOGV` for use with asynchronous logging. Both macros should now verify log level.
2022-07-11Update build instructionsjapm48
2022-06-29Merge pull request #712 from kinetiknz/fix_declAshley
Clarify `cubeb_async_log_reset_threads` declaration.
2022-06-30Clarify `cubeb_async_log_reset_threads` declaration.Matthew Gregan
2022-06-23fix threading errors-
rearrange the cross-thread load to be the second load; being a little late may cause it to be lucky! (this probably doesn't matter)
2022-06-21CI: update actions to v3, use macos-11 environment and bump Android API targetaeiouaeiouaeiouaeiouaeiouaeiou
2022-05-31Update INSTALL.mdKevin Yin
correct typo
2022-04-13wasapi: Fail stream setup instead of asserting if device latency unavailable.Matthew Gregan
Follow up to https://github.com/mozilla/cubeb/pull/695. Before that PR, we would fail setup when GetDevicePeriod failed. This restores that behaviour.
2022-04-13wasapi: Stop audio clients when render thread exits.Matthew Gregan
2022-04-11wasapi: Enumerate only active devices when matching BT output device.Matthew Gregan
Potentially significantly shrinks the list of devices to search when matching BT output device with specified BT input device. On my local machine, this shrinks the list from 25 to 7, and reduces the initial enumerate time from ~67ms to ~32ms (and a subsequent call from ~14ms to ~12ms).
2022-04-11wasapi: Avoid enumerating DEVICE_STATE_NOTPRESENT devices.Matthew Gregan
Devices in this state are not visible in the Sound Control Panel or other typical places in the OS audio UI, so there's little point in including them in cubeb's device list. On my test machine, this reduces the number of devices enumerated from 118 to 25 - reducing the cost of an initial cubeb_enumerate_devices from ~215ms to ~67ms (and a subsequent call from ~22ms to ~14ms).
2022-04-11wasapi: Rework emergency_bailout mechanism.Matthew Gregan
- Rather than "leak" an atomic bool to the stuck render thread, we instead "leak" the entire stream and leave the render thread to clean up. - render thread now checks `handle_emergency_bailout()`, which frees the stream and exits the render thread in bailout condititions. - Removed `thread_ready_event`, since it's no longer needed.
2022-04-06Update README.mdMatthew Gregan
Fix wiki link.
2022-03-30audiounit,pulse,wasapi: Handle data_callback errors and signal to user via ↵Matthew Gregan
state_callback.
2022-03-30Add test case for data_callback returning error.Matthew Gregan
2022-03-24Switch device only when the users don't specifiy a particular device (#697)Chun-Min Chang
* Don't change `output_device_id` once it's set * Fallback to use default device only when not specifying a device We should only fallback to use default device if the user doesn't ask to use a particular device. * Follow default device changes only when using default device explicitly We should get the default device change notifications only when users ask to follow the default devices. * Don't reinit stream when user-selected device is unplugged If the user specifies a device explicitly, don't switch device for the stream when the selected device is gone. We should fire an error callback instead. * Rename `picked_output_device_id` to `selected_output_device_id` * Rename fallbackable to allow_fallback * Correct the comments * Fix double free problem unique_ptr can not be initialized from another unique_ptr's raw pointer, otherwise we will free the pointee twice! * Add an util to copy wide-char string * Prefer move This might be overkilled, but it expresses the intention clearly
2022-03-24Don't reset device if DISABLE_DEVICE_SWITCHING is setChun-Min Chang
We should not always reset the device when the current device is unplugged. The device reset or not should follow the CUBEB_STREAM_PREF_DISABLE_DEVICE_SWITCHING pref.
2022-03-24Fire error callback when reinit failsChun-Min Chang
2022-03-23Make sure input latency is larger than zeroChun-Min Chang
2022-03-23Return matched device from wasapi_find_bt_handsfree_output_deviceChun-Min Chang
Instead of changing `stm->output_device_id` in the `wasapi_find_bt_handsfree_output_device`, setting it in `setup_wasapi_stream` makes all `stm->output_device_id` updates in the same place
2022-03-23Rename functionChun-Min Chang
2022-03-23highlight type castChun-Min Chang
2022-03-23Avoid duplicate GetDevicePeriod callChun-Min Chang
The value returned from `GetDevicePeriod` is the same as `latency_hi` from `wasapi_create_device`
2022-03-23Call wasapi_create_device only when necessaryChun-Min Chang
`wasapi_create_device` is called in `setup_wasapi_stream_one_side` to customize input settings. We should call it only when setting up input side.
2022-03-23Don't reset input_bluetooth_handsfree when setting outputChun-Min Chang
The duplex stream's `input_bluetooth_handsfree` shouldn't be reset during setting output side
2022-03-23Group related linesChun-Min Chang
2022-03-23Get default_period only when we need itChun-Min Chang
`default_period` is used to calculate the input latency. We can avoid calling for output.
2022-03-22Add device selection to cubeb-testChun-Min Chang
It's a lot easier to develop/debug device-related features/issues if we can select input or/and output device for the audio stream in cubeb-test
2022-03-22Update INSTALL.mdChun-Min Chang
The repo is moved from kinetiknz/cubeb.git to mozilla/cubeb.git
2022-03-09build: Return to building bundled speexdsp as object library.Matthew Gregan
2022-03-09wasapi: Fix formatting.Matthew Gregan
2022-03-09jack: Fix formatting.Matthew Gregan
2022-03-09jack: Build fix for resampler API change.Matthew Gregan
2022-03-08Add a parameter to cubeb_resampler_create to enable reclockingPaul Adenot
2022-03-03owned_critical_section: Replace CRITICAL_SECTION with SRWLOCK on Windows.Matthew Gregan
2022-03-03wasapi: Protect access to cubeb context members.Matthew Gregan
2022-02-28wasapi: Avoid configuring output side of resampler when using dummy_output.Matthew Gregan
Possible fix for test_loopback assertion failure.
2022-02-28Assert device collection callbacks were unregistered before cubeb_destroy is ↵Matthew Gregan
called.
2022-02-02build: use libbsd when using OSS and glibcAndrea Pappacoda
Some systems offer OSS v4 but do not have BSD-only functions like strlcpy, used in cubeb_oss.c. An example is Debian GNU/kFreeBSD, that uses a FreeBSD kernel with GNU userspace utilities, like glibc. With this patch cubeb will be able to build on these systems thanks to the help of libbsd, that privides most libc functions that you would expect on BSD.
2022-02-02cubeb_oss: Force at maximum 32ms service intervals.Hans Petter Selasky
Also when the latency is specified to be very big. This might be a bug in some upper layer, although I see other cubeb audio drivers doing the same. This "fixes" audio sync with youtube videos.
2022-01-11waspi: Simplify default devices query and avoid nullptr deref.Matthew Gregan