aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/cubeb
AgeCommit message (Collapse)Author
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
2016-02-26Exorcise cubeb-stdint.h generation.Matthew Gregan
2016-01-22API change for device notificationsAlex Chronopoulos
2016-01-21pulse: Add input and full-duplex stream modes.Alex Chronopoulos
Squashed commit of the following: commit e7fbb781f8442be81871a9e2b4aeb620b599d56c Merge: 6ee511d adf5f85 Author: Matthew Gregan <[email protected]> Date: Thu Jan 21 15:16:51 2016 +1300 pulse: Address review comments. commit adf5f856867a57280e5fee0db54376875f758e9b Author: Alex Chronopoulos <[email protected]> Date: Wed Jan 20 18:50:25 2016 +0200 Change input stream name and remove monotonic commit 04623fdd54459812b8b132d8ac8540e2a9b420c2 Author: Alex Chronopoulos <[email protected]> Date: Wed Jan 20 18:19:00 2016 +0200 Return error invalid format commit 6c220747aeb94dd540ba9025b6574ee966c3f4b9 Author: Alex Chronopoulos <[email protected]> Date: Wed Jan 20 17:15:44 2016 +0200 Apply review comments commit 217b1c79f2f7282ff52faf81ad74760db570a3e0 Author: Alex Chronopoulos <[email protected]> Date: Wed Jan 20 15:40:21 2016 +0200 reset test files to master commit 008869c8176dfc77260913b1d03e1630db914995 Author: Alex Chronopoulos <[email protected]> Date: Wed Jan 20 15:33:07 2016 +0200 Reset resampler to master commit 5414e31bb0e4e5f3bb0901750aceeea9d441b982 Author: Alex Chronopoulos <[email protected]> Date: Wed Jan 20 11:13:02 2016 +0200 Reset alsa to master commit 3231a4394a6289e3299268e0d428c939199d3d52 Author: Alex Chronopoulos <[email protected]> Date: Fri Jan 15 18:47:50 2016 +0200 Update tests with devid commit 25b8fd6fb25291c7b9680c8adf01bd395c1a401e Author: Alex Chronopoulos <[email protected]> Date: Fri Jan 15 18:46:07 2016 +0200 Do not shutdown without drain first commit 1b2766fcf0bd6e2a2a56715f8e0d0db638a00edb Merge: 27e495b ce689bc Author: Alex Chronopoulos <[email protected]> Date: Fri Jan 15 14:29:25 2016 +0200 Rebase after review comments commit 27e495b6f3f42c0bb7bdfc4faed35f231a89d4be Author: Alex Chronopoulos <[email protected]> Date: Fri Jan 8 16:49:46 2016 +0200 Update after review comments commit 2142c6215a27d8c71437c6487f592199908afb84 Author: Alex Chronopoulos <[email protected]> Date: Mon Dec 28 18:33:51 2015 +0200 Avoid truncating the input commit 55f98e271378ab482a8cded6db6cc51afb8129a3 Author: Alex Chronopoulos <[email protected]> Date: Wed Dec 16 15:29:40 2015 +0200 Create remaining buffer commit 8a16fda1a6d71965797a03a41f887d26288ba10b Author: Alex Chronopoulos <[email protected]> Date: Thu Dec 10 14:26:07 2015 -0500 Dummy commit commit d710886595cc4e8dc5567ac51bf9993f25b499bd Author: Alex Chronopoulos <[email protected]> Date: Wed Dec 9 09:54:10 2015 -0600 Add device id commit dd805eed9641da44684d9d74fbd42fc7152402a0 Author: achronop <[email protected]> Date: Thu Dec 3 18:57:26 2015 +0200 Set minimu buffer and some compile errors. commit 1c48e603dd885ab29af888da93cf29367d9a6a47 Author: achronop <[email protected]> Date: Tue Dec 1 15:22:09 2015 +0200 Separate input and output operation. commit 1267ff37791a16bb5eadc029a57005f0e515edfa Author: achronop <[email protected]> Date: Mon Nov 30 11:13:19 2015 +0200 Set up record stream and feed it to data callback commit 72cf1d740eb4b8b77ec18b3a9b2c05650490f484 Author: achronop <[email protected]> Date: Wed Nov 25 11:46:23 2015 +0200 Replace stream to output stream and add input stream. commit a15e1d74df39c3be15743b0bba2e34b4d9d7b87f Author: achronop <[email protected]> Date: Fri Nov 20 18:54:08 2015 +0200 alsa: just make it compile commit d79e5b0f5fb2523418a2758f3a432aea292ef193 Author: achronop <[email protected]> Date: Fri Nov 20 18:31:41 2015 +0200 Just make pulse compile commit 916d0c4535b8a0ed027a6dae2730cd1b8f7e0db7 Author: achronop <[email protected]> Date: Fri Nov 20 17:47:01 2015 +0200 Apply padenot's patch to HEAD without win commit ce689bc203fc2d2a564e7e8aaa88fcacf94b5962 Merge: 23a17cb 47d5237 Author: Alex Chronopoulos <[email protected]> Date: Fri Jan 8 20:21:41 2016 +0200 Full-duplex implementation for PulseAudio including common files commit 47d5237e9510f934382b2c8179bf1f873922b94b Author: Alex Chronopoulos <[email protected]> Date: Fri Jan 8 16:49:46 2016 +0200 Update after review comments commit d0c1ec7cf1d7d635a5f287a0cde17ade1d5df332 Author: Alex Chronopoulos <[email protected]> Date: Mon Dec 28 18:33:51 2015 +0200 Avoid truncating the input commit 083fd4bce68b102337451d6f75b832415364fabc Author: Alex Chronopoulos <[email protected]> Date: Wed Dec 16 15:29:40 2015 +0200 Create remaining buffer commit 71d4c64ae5fc7c7f1268d5d2593bfac65d8689cf Author: Alex Chronopoulos <[email protected]> Date: Thu Dec 10 14:26:07 2015 -0500 Dummy commit commit 60a01d0aa8cbbf9d73820a5504ecb1a04ffb33e1 Author: Alex Chronopoulos <[email protected]> Date: Wed Dec 9 10:36:06 2015 -0600 Pual's change about dev id commit 5a3fedd7d77b20b5d2c03a2aa375044218cd71db Author: Alex Chronopoulos <[email protected]> Date: Wed Dec 9 09:54:10 2015 -0600 Add device id commit a433cec38f9c6d1854720717b1a56b513f6741ed Author: achronop <[email protected]> Date: Thu Dec 3 18:57:26 2015 +0200 Set minimu buffer and some compile errors. commit c3d3c439319cd3f6aeaa2a653a83c2e59a8b756a Author: achronop <[email protected]> Date: Tue Dec 1 15:22:09 2015 +0200 Separate input and output operation. commit cc12d7e3c4edc0ff50c58803b8a7c4d36e55a045 Author: achronop <[email protected]> Date: Mon Nov 30 11:13:19 2015 +0200 Set up record stream and feed it to data callback commit 0cb6b12eea12fc3ca07b016623451336927d37f7 Author: achronop <[email protected]> Date: Wed Nov 25 11:46:23 2015 +0200 Replace stream to output stream and add input stream. commit e059a8c995e653c3a98f9b1281d33cd79426a570 Author: achronop <[email protected]> Date: Fri Nov 20 18:54:08 2015 +0200 alsa: just make it compile commit f6b27e5383ba89c89836f6eb2296781f5fa81183 Author: achronop <[email protected]> Date: Fri Nov 20 18:31:41 2015 +0200 Just make pulse compile commit d3f10c5e277e7562ae92f9fd094c03b2bddc4c85 Author: achronop <[email protected]> Date: Fri Nov 20 17:47:01 2015 +0200 Apply padenot's patch to HEAD without win
2016-01-21cubeb_stream_init should take a cubeb_devid rather than a char const *.Matthew Gregan