Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
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
```
|
|
streams. Closes #643.
|
|
|
|
|
|
|
|
this in WASAPI.
|
|
|
|
|
|
|
|
|
|
|
|
This is best done by the host application, and had very little
implementation anyways.
|
|
This has been merged in Gecko via BMO# 1427011 for quite some time.
|
|
streams will transport voice. r?kinetik
|
|
|
|
|
|
|
|
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.
|
|
|
|
* 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.
|
|
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.
|
|
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.
|
|
Also update the example code comment in cubbeb.h to reflect new param usage.
|
|
- 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
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
Chose to use uin32_t because it was the type that is taken by
cubeb_get_max_channel_count, cubeb_get_min_latency, etc.
|
|
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.
|
|
|
|
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
|
|
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]>
|
|
* Multiple channel support on Windows
* Move up/down mixing code from cubeb_wasapi.cpp to standalone cubeb_mixer.cpp
|
|
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.
|
|
|
|
|
|
|
|
|
|
This fixes #159.
|
|
|
|
|
|
|
|
|