aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
AgeCommit message (Collapse)Author
2024-02-07384kHz ought to be enough for anybodyPaul Adenot
2024-01-15Add an API for muting the input side of a streamAndreas Pehrson
2024-01-15Add APIs for input processingAndreas Pehrson
2023-11-10Non functional change: Fix missing documentation in cubeb.hPaul Adenot
2021-07-28Run .clang-formatChun-Min Chang
Format all the code under `include` and `src` except those files under `src/speex` with style setting in `.clang-format` file by the following script: ```sh FILE_LIST="$(find "include" "src" -not -path "src/speex/*" | grep -E ".*(\.cpp|\.c|\.h|\.hpp|\.hh)$")" echo "Files found to format:\n---\n$FILE_LIST\n---" clang-format --verbose -i $FILE_LIST ```
2021-07-20wasapi: Don't set AUDCLNT_STREAMFLAGS_NOPERSIST on IAudioClient (<3) ↵Matthew Gregan
streams. Closes #643.
2021-02-17Remove cubeb_stream_reset_default_device API.Matthew Gregan
2020-10-28AAudio: Address first review commentsnyorain
2020-10-19Add an option to not automatically connect ports on jack. (#613)Richard Dodd (dodj)
2020-10-09Add stream preference to request a persistent stream session and implement ↵Admiral H. Curtiss
this in WASAPI.
2020-10-07Make RAW WASAPI streams opt-inPaul Adenot
2020-10-07Add method to change stream nameBrendan Early
2020-06-24Add in header doc the switching devices behavior.Alex Chronopoulos
2020-04-29Add a method to get audio input latency on a stream (#583)Paul Adenot
2019-11-25Update example code (#555)Jan
2019-08-22Remove panning API from cubebPaul Adenot
This is best done by the host application, and had very little implementation anyways.
2019-05-17wasapi: Add flag to disable default device switching. (#507)Matthew Gregan
This has been merged in Gecko via BMO# 1427011 for quite some time.
2019-04-10Bug 1531833 - Add a cubeb pref to indicate the this audio input and output ↵Paul Adenot
streams will transport voice. r?kinetik
2019-01-21Add cubeb_stream_params::layout in the code exampleAlex Chronopoulos
2019-01-16Fix example code using nonexistent output buffer. (#485)Jamen Marz
2018-10-24doc: update docs for register collection changed callback. Fixes 42Alex Chronopoulos
2018-03-21wasapi: Remove COM initialization and require caller to complete.Matthew Gregan
This addresses the thread local COM initialization lifetime problem discussed in issue #416 by moving the responsibility for COM initialization from within cubeb to the caller.
2018-03-20Remove stray `1 <<` from CUBEB_LAYOUT_3F2_BACK.Dan Glastonbury
2018-03-19Multi-channels support for windows/mac/linux (#426)Jean-Yves Avenard
* Add QUAD and QUAD_LFE layouts. * Remove dual mono layout. It makes no sense to have a case for those as the data structure used (a bitmask) do not allow to represent this channel layout (a channel can only be present once). As such it was a non-functional layout * Fix up cubeb_pulse compilation using C++ keyword. * Remove the concept of preferred layout. Channel layout is derived by the content being played. The concept of preferred layout is meaningless. Either we have a layout defined, or we don't. There's no in-between. So we remove it. * Remove CHANNEL_MONO concept. * Add cubeb_sample_size convenience method. * Rework cubeb_mixer. This completely replace the existing remixer which had serious limitations: 1- Had no memory bound checks 2- Could only downmix 5.1 and 7.1 to stereo. This mixer allows to convert from any sane layout to any other and work directly on interleaved samples. This cubeb_mixer doesn't have an API compatible with the previous one. This commit is non-fonctional, and was split for ease of review. * Fix remixing on mac, windows and pulse backend. * Make cubeb_mixer creation infallible. Rather than ignore nonsensical layouts, we attempt to play it according to the stream channels count instead. The audio data will be played as-is, dropping the extra channels or inserting silence where needed. * User proper sample size when calculating offsets. Should the user data be of a different type to what the AudioUnit output is set to, we would have written outside the end of our allocated buffer. * Fix input mixing and clarify frames vs samples terminology * If a layout is unknown or invalid, always treat it as plain stereo or mono.
2018-03-01Clarify cubeb_data_callback ret value for input only streams.Bryce Van Dyk
The description of the ret value of cubeb_data_callback specifies that it is the number of frames written to the output buffer. However, in the input only stream case no data should be written to the output buffer and the output buffer arg will be NULL. This leaves it unclear as to the value that should be returned in the input only case. To prevent a drain nframes should be returned, however, reading the documentation left me unsure as to if I should return 0 or nframes. This commit attempts to clarify the doc comment for input only streams.
2018-02-13Provide access to cubeb_stream's user ptr. (#407)Dan Glastonbury
Provide access to cubeb_stream's user ptr. cubeb_stream in every backend has a copy of the user data ptr passed in during `stream_init` but there is no way to access the value. (Besides from `data_callback`/`state_callback`). Add `cubeb_stream_user_ptr()` to retrieve the stored value.
2018-01-23Explicitly init stream_params.prefs in tests.Bryce Van Dyk
Also update the example code comment in cubbeb.h to reflect new param usage.
2018-01-23Respond to review comments.Bryce Van Dyk
- Fix indentation in header - Adjust spacing for casts and pointer + ref declarations - Adjust comments in test about locking after stop - Simplify default device selection when loopback is involved
2018-01-23Add stream preferences enum to stream params, add a loopback pref.Bryce Van Dyk
2017-11-28Replace instances of 'S' with 'RC' in the SMPTE channel layout comment.Bryce Van Dyk
Looking at the table S appears to be undefined. I believe it is intended to represent the same thing as 'RC': rear center. This updates the comment to reflect this.
2017-11-28Update header sample code to rename several instances of output_params -> ↵Bryce Van Dyk
input_params. The sample code in the header looks to have a few instances where 'output_params' is used where 'input_params' looks intended. This renames those cases.
2017-08-07Remove unused B2G-only stream_type field from cubeb_stream_params. (#347)Matthew Gregan
2017-07-07Add an API to reset audio stream to the default deviceChun-Min Chang
2017-06-24Use consistent types for channels, rate, and latency in API.Dan Glastonbury
Chose to use uin32_t because it was the type that is taken by cubeb_get_max_channel_count, cubeb_get_min_latency, etc.
2017-06-24Change cubeb_get_min_latency to take params via pointer.Dan Glastonbury
To be consistent with cubeb_stream_init, take the cubeb_stream_params parameter via pointer instead of by value. This is a public API change only---Backends are handed params by value via ops table.
2017-06-15Fix documentation of cubeb_device_changed_callback (#327)Cheng Sun
2017-05-25Rework device collection (#309)Dan Glastonbury
Rust compatiblity change to cubeb_device_collection. Replace the C dynamic allocation with magic header into a structure that hold pointer + count of entries. This is the same memory layout that rust uses for fat pointers for &[T], Box<[T]>, etc.
2017-05-22Push destroy fns to backend (#302)Dan Glastonbury
* Make cubeb_device_info_destroy private. * Move implementation of cubeb_device_collection_destroy to cubeb_utils. * Move cubeb_device_collection_destroy implementation into backend. Push the responsiblity for destroying device collections to the backends so they can make independent choices on how to handle allocation. * Unstage space changes
2017-03-13cubeb-api: Give cubeb_init a third param, backend nameDamien Zammit
This allows forcing of a particular backend by name, *if* it was compiled in, otherwise default list is tried in default order as before. Tests updated to reflect new api. (Gecko change required) Using JACK backend: 100% tests passed, 0 tests failed out of 13 Total Test time (real) = 183.75 sec Signed-off-by: Damien Zammit <[email protected]>
2016-12-20Support multiple channels on Windows (#171)Chun-Min Chang
* Multiple channel support on Windows * Move up/down mixing code from cubeb_wasapi.cpp to standalone cubeb_mixer.cpp
2016-11-08Make API visible cubeb_device_info members and cubeb_devid const.Matthew Gregan
The API user is never permitted to modify these (nor deallocate them directly, which non-const can imply), so they should marked const in the public definition. I suspect this happened originally because free()ing the cubeb_device_info members requires casting const away in cubeb_device_info_destroy, but other than being slightly ugly there's no problem doing that and it's better to have the public API be consistent. This also allows fixing the const-ness of utf8_to_wstr and wstr_to_utf8 const in cubeb_wasapi.cpp.
2016-10-12Simplfy LOG*() macros and pass valist through to log callback.Matthew Gregan
2016-10-12Replace autotools build system with CMake.Matthew Gregan
2016-10-10Address review comments.Paul Adenot
2016-10-10Fix cubeb.h so that it works on master.Paul Adenot
2016-10-10Add a new API to enable external logging.Paul Adenot
This fixes #159.
2016-08-23Fix Doxygen docs for cubeb_stream_init.Matthew Gregan
2016-07-12cubeb.h - Use frames for the different latency in external interfaces.Paul Adenot
2016-07-01Address comments.Paul Adenot
2016-07-01Update cubeb documentation for duplex streams.Paul Adenot