Age | Commit message (Collapse) | Author |
|
|
|
to avoid breaking unified builds when building tests in Firefox.
|
|
This is best done by the host application, and had very little
implementation anyways.
|
|
* tests: check correctly the audio buffer values range (BMO 1484541).
* tests: create a comfortable way to enable logs in tests
* duplex test: check audio range correctly and change the input channel to stereo to avoid AD mixer (BMO 1484541).
* test_duplex: Revert back input channel to mono
|
|
* 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.
|
|
Also update the example code comment in cubbeb.h to reflect new param usage.
|
|
Set CUBEB_BACKEND env var to the name of valid backend supported by
the current platform to prefer that backend over the default choice.
If CUBEB_BACKEND is not valid, backend selection falls back to the
standard behaviour.
A warning is printed to stderr if the chosen backend id doesn't match
the requested one.
|
|
The WASAPI backend supports S16, same as the other backends.
|
|
|
|
explicit flow control
|
|
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]>
|
|
* Tests: don't use dynamic memory allocation for synth_state
* Tests: avoid explicit control flow for error/resource management, use RAII helpers
* Tests: put synth_run into synth_state struct
* Tests: use std::string to simplify backend matching code
* Use range-based for loop
|
|
|
|
* Multiple channel support on Windows
* Move up/down mixing code from cubeb_wasapi.cpp to standalone cubeb_mixer.cpp
|
|
The existing implementation called pa_cvolume_set_balance on an
uninitialized pa_cvolume (which triggered a Valgrind warning) and then
forgot to apply the result to the sink input.
|
|
This is primarily required to fix Gecko integration bustage on the OS X
10.7 builders, where defining _XOPEN_SOURCE before including <iostream>
causes errors with _asprintf_l in the C++ <locale> header.
|
|
|
|
Syntax only changes. This is necessary for Gecko integration.
|
|
|
|
|
|
|
|
|
|
This reverts commit 70497380eb5351f967c3fa52f3eb432969c2e65d.
See comment 4 in the BMO bug for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is changing all the signatures of the `cubeb_stream_init` implementations,
the signature of the `data_callback` type, so that cubeb can support audio
input.
`cubeb_stream_init` now has two `cubeb_stream_params` pointers, one for input,
one for output. If two pointers are passed, a "duplex" stream is opened. If only
one pointer is passed, an input-only or output-only stream is created.
Duplex streams have the same sample rate, and sample type. They don't have to
have the same number of channels.
`data_callback` now has two pointers to audio buffers: an input buffer (`NULL`
if this is an output-only stream) containing input data (e.g. a microphone), and
an output buffer, to be filled, as usual, with the audio frames to play. The
two buffers always have the exact same number of audio frames, and are
temporally correlated in a way that ensures the minimal loop-back latency on
the system if one directly copies the input buffer to the output buffer.
No functionnal changes are present in this patch, just signature changes.
Asserts have been added to prevent users to try to use the input code path for
now.
Actual implementations with the input code for different platforms will follow.
Green `mozilla-central` push:
<https://treeherder.mozilla.org/#/jobs?repo=try&revision=15b4dd3cbbe8>
|
|
|
|
|
|
|
|
|
|
|
|
test to test_audio.
|
|
|