Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
argument.
|
|
|
|
|
|
|
|
|
|
|
|
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
```
|
|
|
|
|
|
|
|
|
|
Ameliorates code duplication in cbjack_connect_ports().
|
|
|
|
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
|
|
|
|
Since the JACK backend fakes the enumerate_devices API by returning two
"default" devices, we should also accept those "default" devices in
cbjack_stream_init if they're passed in via {input,output}_device.
|
|
On Linux dependending on distribution `.so` symlink maybe missing.
On OpenBSD `.so.X` symlink is missing unlike `.so` while `.so.X.Y`
often changes downstream.
|
|
This is best done by the host application, and had very little
implementation anyways.
|
|
* 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.
|
|
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.
|
|
Loopback is not supported outside of WASAPI, so if it's requested an error is
returned. This error is set to indicate loopback is not supported in most
cases. Though in some cases a generic error is returned to avoid complicating
existing code.
The current API means requesting a loopback for an output stream doesn't make
sense. However, to keep handling simplified both input and output params are
handled in the same or similar fashion by this commit. Both kinds of request
should fail, but no extra indication is given that requesting output loopback
is aberrant (since it will fail anyway).
|
|
|
|
|
|
|
|
|
|
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.
|
|
* 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
|
|
* Multiple channel support on Windows
* Move up/down mixing code from cubeb_wasapi.cpp to standalone cubeb_mixer.cpp
|
|
|
|
|
|
cubeb_devid is intended to be an opaque type for API users. Internally,
a cubeb_devid should be converted to the original type at the earliest
possible point.
|
|
|
|
|
|
|
|
Signed-off-by: Damien Zammit <[email protected]>
|
|
|
|
|
|
|
|
The caller now doesn't need to use the id_to_str() intricacies and we
don't have to bother with adding a symetric free() for the retrieved value.
|
|
No backends support this yet.
|
|
|
|
|
|
|
|
|
|
test to test_audio.
|