aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2020-09-17Always return a valid string (possibly empty) for the group_id and the ↵Paul Adenot
friendly_name in the WASAPI backend
2020-09-17Always brace if statements in wasapi_create_devicePaul Adenot
2020-09-15Reset device when reconfiguring streamPaul Adenot
2020-09-14Fix integer underflow/unsigned wrapping.Angelo Haller
The number of xrun fragments to skip is added once to ctx->jack_xruns but then subtracted multiple times (once for each stream) from the same variable. This causes the unsigned int to "underflow" and wrap around. - Use unsigned int in all calculations instead of mixing un/signed. - Remove erroneous and useless subtraction logic - Replace for loop by simple multiplication - Remove unneeded casts to float
2020-09-11Fix printf formatPaul Adenot
2020-09-09Consistently use frames for latency requestsPaul Adenot
2020-09-09Clean up the cubeb_device_info when checking if the device is a bluetooth ↵Paul Adenot
handsfree device
2020-09-09Assert that the temporary stack buffer used to prefill the resampler are big ↵Paul Adenot
enough
2020-09-09Only perform device matching when using a bluetooth handsfree devicePaul Adenot
2020-09-09When configuring the input side of a duplex stream, and it's a bluetooth ↵Paul Adenot
device using handsfree, use a higher latency to prevent underruns
2020-09-09Always get a device enumerator when creating a streamPaul Adenot
2020-09-09Don't account for unresampled data when computing how much input is needed.Paul Adenot
2020-09-09Handle underrun without asserting when resampling an input stream in duplex modePaul Adenot
2020-09-09Pre-feed the resampler with zeros to compensate for its latencyPaul Adenot
2020-09-09Fix the input stream prefs check for deciding if a stream is for voicePaul Adenot
2020-09-09When opening an output device after having opened an input device, try to ↵Paul Adenot
match to the same physical device, if the output device is not specified (i.e. use default). This fixes audio on a Sony WH1000-xm3, test_duplex.exe, when set to use 16kHz sample-rate, now works. There is a bug in the resampling code related to an off-by-one when rounding that prevents all rates to work. This will be fixed in a subsequent patch.
2020-09-09Rename input_device and output_device as input_device_id and output_device_idPaul Adenot
2020-09-09Add logging to latency queriying methodsPaul Adenot
2020-09-09Don't return early when there is no input data.Paul Adenot
This is simply wrong. Input data are accumulated into the buffer, and the buffer is emptied into the resampler. The resampler controls the buffering. It's certainly possible to not have input data here, and having had two packet worth of data in a previous callback. This fixes constant glitches on a Sony WH1000-mk3, and doesn't seem to regress the wired/built-in devices I have.
2020-09-09Separate the role and the fact that the stream is being used for voice. Use ↵Paul Adenot
a resampler setting to lower latency when the stream is for voice Picking the default communication device was tried, and is not what users expect it seems. Using a lower setting for resampling voice prevent adding too much latency: 120 frames for 16k->48k in DESKTOP vs 72 in VOICE, and lowers CPU usage.
2020-09-09Add logging to make it clear what resampling setup is being useddPaul Adenot
2020-08-26sun: Fix use-after-free of s->mutex in sun_stream_destroy.Ka Ho Ng
2020-08-26sun: building fix in sun_stream_get_latencyKa Ho Ng
2020-07-07Bump the priority of audiounit-rust in default initChun-Min Chang
2020-07-03Merge branch 'Filoppi-patch-1'Matthew Gregan
2020-07-03Fix conversion from com_heap_ptr.Matthew Gregan
2020-07-03Merge branch 'patch-1' of https://github.com/Filoppi/cubeb into Filoppi-patch-1Matthew Gregan
2020-06-30resampler: avoid overflow on uint arithmeticsAlex Chronopoulos
2020-06-30As suggestedFilippo Tarpini
2020-06-29Fixed small memory leakFilippo Tarpini
Reference: https://docs.microsoft.com/en-us/windows/win32/api/audioclient/nf-audioclient-iaudioclient-isformatsupported
2020-06-24Add in header doc the switching devices behavior.Alex Chronopoulos
2020-06-10Clamp stream_delay calculation to zeroPaul Adenot
For the same reasons we do it in other methods: it's possible that we've not written enough frames to be greater than the latency.
2020-05-29Add input stream latency test (#590)Koalab99
* Add input stream latency test It calls the stream ops and ask for input latency if the output device has type INPUT. * Changes for pull 590 Co-authored-by: Corentin ARNOULD <[email protected]>
2020-05-25CI: add FreeBSD jobsJan Beich
2020-05-20QueryPerformanceCounter returns non-zero in case of successPaul Adenot
I forgot to `git add` this bit...
2020-05-08sun: Fix arithmetic on void pointer.nia
Noticed when building with a newer clang version.
2020-05-07Allow setting the voice flag for input OR output, depending on the param ↵Paul Adenot
struct that has the flag
2020-05-07Use the same workaround in get_latency than in get_position, in cubeb_wasapi.cppPaul Adenot
2020-04-29Add a method to get audio input latency on a stream (#583)Paul Adenot
2020-04-26tests: Fix crash when device enumeration is not supportedCameron Cawley
2020-04-09Only print the filename when logging (#581)Chun-Min Chang
* Only print the filename when logging This keeps the logging message consistent after https://github.com/djg/cubeb-rs/pull/50 is merged, which fixes the BMO 162132. Instead of printing the full path to the file that is currently running, we should print the filename only. As long as we have the filename and the line, we know where the log comes from. * Reformat `LOG_INTERNAL` Align the `\` used for `LOG_INTERNAL` macro. * Correct position of `__FILENAME__` * Define `__FILENAME__` by `__FILE_NAME__` if possible clang 11 provide a `__FILE_NAME__` [1] macro. We should use it if it exists. [1] https://clang.llvm.org/docs/LanguageExtensions.html#builtin-macros * Use `strrchr` in `string.h` when building by MSVC There is no `__builtin_strrchr` in MSVC, so we fullback to use the `strrchr` in `string.h` to trim the path above the current file name.
2020-04-07sun: Line continuation character not needednia
2020-04-07sun: POLL_TIMEOUT is no longer usednia
2020-04-07sun: Add my email address to the copyright header.nia
2020-04-07sun: Refactoring: reduce duplication in stream structure.nia
Seperate out 'floating' value for record and play.
2020-04-07sun: Make the purpose of some variables clearer.nia
2020-04-07sun: Update header inclusion.nia
2020-04-07sun: Convert floats to LINEAR32 instead of LINEAR16nia
2020-03-31Remove test for registering device changed callback twiceChun-Min Chang
audiounit-rust backend will return an error instead of hitting an assertion when registering a callback by calling `cubeb_stream_register_device_changed_callback` without unregistering the registered callback. It's not possible to run a death test in gtest for the Rust API[1] [1] https://users.rust-lang.org/t/how-to-write-a-death-test-in-gtest-for-rust-apis/23575
2020-03-24Force Rust builds to always rerun cargo.Matthew Gregan