aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
AgeCommit message (Collapse)Author
2024-11-22Update cubeb-{coreaudio,rust}-rs submodules to pick up checked-in Cargo.lockHEADmasterMatthew Gregan
2024-11-20Update rust submodules.Miriam Zimmerman
Also, use gecko-in-tree feature to break circular dependency.
2024-10-24Update cubeb-coreaudio-rs.Miriam Zimmerman
Pull in version of cubeb-coreaudio-rs that fixes a bug with downmixing stereo input to a mono channel.
2024-10-16Update cubeb-coreaudio-rs and cubeb-pulse-rs.Miriam Zimmerman
Specifically, pull in https://github.com/mozilla/cubeb-coreaudio-rs/pull/236 and https://github.com/mozilla/cubeb-pulse-rs/pull/94
2024-09-25Add submodules for tier-1 rust backends.Miriam Zimmerman
Per https://github.com/mozilla/cubeb/wiki/Backend-Support the rust backends for pulse and coreaudio are tier-1 and the older C++ backends are tier-4. So, add these backends to cubeb by default.
2024-09-06wasapi: Fix default device handling.Miriam Zimmerman
Prior to https://github.com/mozilla/cubeb/pull/682, a device could be default for all of MULTIMEDIA, NOTIFICATION, and VOICE. After that PR, the first two were mutually exclusive with the third, I believe unintentionally. Restore this behavior so that, e.g., on devices with only one output device, querying for the "voice" device returns that device.
2024-08-17opensl: Add extra asserts to help track down BMO 1913284.Matthew Gregan
2024-08-17opensl: Switch asserts to XASSERT wrapper.Matthew Gregan
2024-07-10[AAudio] offset position by number of written frames.John Lin
When reinitializating, `cubeb_stream::previous_clock` isn't reset properly but stream gets reset and restarts `AAudioTimingInfo::output_frame_index` from zero. Therefore, `aaudio_stream_get_position()` always reports previous clock rather than actual position until it is surpassed later. To estimate the position correctly, Save the number of frames sent to stream before it's reset, and use the value as the basis for future position estimation.
2024-07-08[AAudio] request pause rather than stop.John Lin
According to the document, AAudioStream_requestStop(): "The stream will stop after all of the data currently buffered has been played." AAudioStream_requestPause(): "Pausing a stream will freeze the data flow but not flush any buffers."
2024-07-08[AAudio] track stopped time.John Lin
aaudio_stream_get_position() calculates position using elapsed time since last callback, including the time during stream is stopped. To interpolate correctly, record the stop time and use it in calculation.
2024-07-05Reset stream params on initAndreas Pehrson
Without a reset, a duplex stream being reused as an output stream will open an input stream and provide an input buffer, which is not expected.
2024-07-01Set buffer capacity to allow for bufferingAndreas Pehrson
2024-06-04Include <memory> for std::unique_ptrChris Peterson
LLVM's libc++ is removing transitive inclusions among std header files in newer C++ versions, so user code must explicitly include needed std header files. In this case, cubeb_opensl.cpp must explicitly include <memory> for `std::unique_ptr` because, starting in C++23, <vector> no longers includes <memory>. https://libcxx.llvm.org/DesignDocs/HeaderRemovalPolicy.html ``` libcubeb/src/cubeb_opensl.cpp:140:8: error: no template named 'unique_ptr' in namespace 'std' 140 | std::unique_ptr<cubeb_stream_params> input_params; | ~~~~~^ ```
2024-05-24Cast to int64_t to fix the build on 64-bits AndroidPaul Adenot
2024-05-24Clamp to positive value when computing latency for an output streamPaul Adenot
Diagnosed by [email protected], the same code is also found in Chromium.
2024-05-24Clamp to positive value when computing latency for an output streamPaul Adenot
Diagnosed by [email protected], the same code is also found in Chromium.
2024-05-21Revert "Fetch avrt.dll functions dynamically again."Paul Adenot
This reverts commit aaffe75c25c18bd171b60edc2d5a6f287a9f9808.
2024-04-30Invalidate timing info buffers when destorying AAudio stream.John Lin
aaudio_stream_get_position() returns incorrect result because aaudio_stream_init() recycled destroyed stream where the timing_info buffers contain stale data.
2024-04-16Account for enqueues while in cubeb_audio_dump_stream::write_allAndreas Pehrson
2024-04-16Add internal utility to log audio streams to disk from real-time audio callbacksPaul Adenot
2024-04-16Attempt to reinitialize the stream when the error callback is called with ↵Paul Adenot
AAUDIO_ERROR_TIMEOUT This can happen when the client side of the AAudio API fails to write all the data to the server side, after the user callback has returned. According to the reporter, this can be hit when a debugger is attached. This fixes #767.
2024-04-16Log a message when waiting for AAUDIO_STREAM_STATE_STOP when shutting down a ↵Paul Adenot
stream in error fails
2024-04-03Some DACs can go up to 768kHzPaul Adenot
2024-03-20Fix mistake in first parameter type in function pointerPaul Adenot
2024-03-19Fetch avrt.dll functions dynamically again.Paul Adenot
Turns out this can crash sometimes, and we need to be more careful. This reverts commit 661c653c8650b2b1c485e86b5a5b4f6d0ed07d1b.
2024-02-15Allow setting CUBEB_INPUT_PROCESSING_PARAM_NONEAndreas Pehrson
Clients may want to disable processing...
2024-02-07384kHz ought to be enough for anybodyPaul Adenot
2024-01-31Format new changesPaul Adenot
2024-01-31audiounit: Resample to match output device hardware sample rate in uncommon ↵Steveice10
cases. In some cases, weird sample rates can cause AudioUnit output units to misbehave. Instead, use resampling for non-native rates to make sure this does not happen.
2024-01-15Add an API for muting the input side of a streamAndreas Pehrson
2024-01-15Add APIs for input processingAndreas Pehrson
2024-01-08Checking buffer, buffer_in, buffer_out pointers for non NULL valuesNikolay Borodin
2023-12-12auto_array: protect from various calls when length_ is 0Andreas Pehrson
cubeb-coreaudio-rs has hit a case when running its tests on MacOS 12 where it fails the `assert(destination && source);` in `PodCopy` because it tried to push 0 samples to an auto_array of length 0, as the internal auto_array buffer had not been allocated yet.
2023-11-21Add static keyword to fix build of tests in unified buildsPaul Adenot
2023-11-21Fix latency reporting on OpenSLPaul Adenot
2023-11-10Include the header directly to use AudioBuffer on macOS in cubeb_ring_array.hPaul Adenot
2023-11-10Consistently use double in the mixerPaul Adenot
This fixes a warning: INT32_MAX cannot be represented as a float.
2023-11-10clang-formatPaul Adenot
2023-11-10Reset logging thread ID when starting a new stream to allow debugging ↵Paul Adenot
comfortably
2023-11-10AAudio: set the callback size to the latency passed in, increase internal ↵Paul Adenot
buffer size to be 3 times the burst size
2023-11-10Add and modify a few logging statementsPaul Adenot
2023-11-10AAudio: when finding that an input device has been disconnected, ↵Paul Adenot
reinitialize the duplex stream
2023-11-10AAudio: remove unused headerPaul Adenot
2023-11-10Reset thread id when a new stream is created, in OpenSL backendPaul Adenot
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-10Fix output buffer conversion: handle differing channel count between input ↵Paul Adenot
and output
2023-11-08Fix mistake break audio input on OpenSL ESPaul Adenot
2023-10-26AAudio: ensure input buffer is large enough when reading input dataPaul Adenot
2023-10-24Return an error if failing to open a recorder and it's not a sample-rate not ↵Paul Adenot
supported issue
2023-09-26Actually use the return value in initialize_with_format callback call.Paul Adenot