* 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.
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.
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.
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 <damien@zamaudio.com>
* opensl: Restore full duplex for OpenSL ES from 1e26a908
* opensl: Fix build errors from gecko build system
* opensl: Add extra debug logs
* opensl: On cubeb_stop pause instead of stop
* opensl: Remove output queue and a small refactoring
* opensl: Remove extra stream destroy on error
* opensl: Change message on assert fail
* opensl: Restore logs after new log system change
* opensl: Android 6 expect EBUSY instead of EDEADLK
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.