Граф коммитов

28 Коммитов

Автор SHA1 Сообщение Дата
Paul Adenot 687b1e3446 Non-functional change: clang-format tests 2023-11-10 15:31:52 +01:00
Paul Adenot 2e0fe89106 Prevent running test that make use of audio input streams on backends that don't implement it 2023-04-26 14:28:46 +02:00
Paul Adenot b8765e132d Inline values for stream params in test_logging.cpp, undef defines in test to avoid breaking unified builds when building tests in Firefox. 2022-12-02 15:40:20 +01:00
Alex Chronopoulos 5066cfcf42
tests: check correctly the audio buffer values range (BMO 1484541). (#461)
* 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
2018-10-18 16:57:01 +02:00
Bryce Van Dyk 4c18a84a45 Explicitly init stream_params.prefs in tests.
Also update the example code comment in cubbeb.h to reflect new param usage.
2018-01-23 08:50:28 +13:00
Alex Chronopoulos af50e9c96f audiounit: clear tsan warnings 2017-06-06 15:46:05 +12:00
Dan Glastonbury c9641ca143 Add backend specification support to common.h
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.
2017-05-23 15:32:12 +12:00
Alex Chronopoulos 17503c4131 Pulse layout assert (#291)
* pulse: relax input layout assert

* test: update record test to accept undefined layout

* pulse: create pa stream with default layout
2017-04-25 15:26:11 +02:00
Chun-Min Chang 2b1132b1e8 Using gtest style's error message in cubeb (#274)
* Replace printf by fprintf

* Turn error log into gtest's style

* Avoid scan-build warning by replacing raw pointer with unique_ptr
2017-04-07 15:44:24 +12:00
Chun-Min Chang 7d68ec269d Replace cubeb_cleaner and cubeb_stream_cleaner by unique_ptr 2017-04-06 20:14:00 +12:00
Chun-Min Chang 2612c2075b Using RAII helpers for cubeb context and stream but leaving test_sanity for explicit flow control 2017-04-06 20:14:00 +12:00
Damien Zammit 4c39aae8d3 cubeb-api: Give cubeb_init a third param, backend name
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>
2017-03-13 11:00:12 +13:00
Alex Chronopoulos 2fb0dfc35d tests: add log method in common and set callback in test_record 2017-02-06 16:02:27 +01:00
Alex Chronopoulos 490e379b1c tests: expect audio instead of noise for input in tests 2017-02-06 16:02:27 +01:00
Chun-Min Chang a900d6e511 Support multiple channels on Windows (#171)
* Multiple channel support on Windows

* Move up/down mixing code from cubeb_wasapi.cpp to standalone cubeb_mixer.cpp
2016-12-20 19:18:07 -10:00
Matthew Gregan b46ffc5d12 Always include "gtest/gtest.h" first.
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.
2016-11-11 16:09:49 +13:00
Matthew Gregan e1da80422e Move gtests under general "cubeb" test case for better Gecko integration. 2016-11-11 15:00:23 +13:00
Matthew Gregan 5a2b774ba4 Allow building gtests as a single binary.
Syntax only changes.  This is necessary for Gecko integration.
2016-11-11 14:50:16 +13:00
Matthew Gregan 5574f4d3a1 Move tests out of main into their own test. 2016-11-11 09:44:29 +13:00
Matthew Gregan 55ed801cfd Convert tests to gtests. 2016-11-11 09:44:29 +13:00
Nicholas Nethercote 474c8ceb4b Remove unnecessary XPCOM dependency from unit tests. BMO #1314514. 2016-11-11 09:44:29 +13:00
Matthew Gregan 8c41e5641d Revert "Remove unnecessary XPCOM dependency from unit tests. BMO #1314514."
This reverts commit 70497380eb.

See comment 4 in the BMO bug for details.
2016-11-03 17:07:19 +13:00
Nicholas Nethercote 70497380eb Remove unnecessary XPCOM dependency from unit tests. BMO #1314514. 2016-11-02 17:54:53 +13:00
Matthew Gregan a1f417334b test: Fix unused parameter warnings. 2016-08-23 13:20:54 +12:00
Paul Adenot 5d41eb1b70 Update tests to have the latency in frames. 2016-07-20 14:20:37 +02:00
Alex Chronopoulos f074a39c80 Change _XOPEN_SOURCE version. 2016-03-26 19:24:25 +02:00
Paul Adenot 0af781aa95 Address review comments.
Build system.

Review comments: cubeb_resampler_speex_one_way ctor should take uint32_t.

Review comments: Use the default device for test_record.cpp

Review comments: use the correct path to include cubeb.h.

Review comments: use std::unique_ptr instead of auto_ptr, and remove auto_ptr implementation.

Review comments: Add test_duplex{,.exe} to .gitignore.

Review comments: Formatting in noop_resampler::fill.

Review comments: rename auto_array::resize to auto_array::reserve.

Review comments: Rename the method that push silence in an auto_array push_silence.

Review comments: Make test_duplex work with backend that use integers.

Review comments: indent in cubeb_resampler.cpp.

Review comments: call the target rate in the public interface of the resampler `target_rate`.

Review comments: Clarify the comment on cubeb_speex_resampler_one_way::drain.

Review comments: trailing space in cubeb_resampler_one_way::output assert.

Review comments: space between T and *.

Review comments: s/outut/output/.

Review comments: return before {.

Review comments: Use unique_ptr to create resampler objects.

We can't really use std::move here, as we appear to target platforms that don't
have it (Gecko on Android uses stlport that does not have std::move).

Review comments: check that the delay lign creation succeeded.

Review comments: Remove frame_count_at_rate.

Review comments: assert speex resampling suceeds.

Review comments: s/l atency/latency/.

Review comments: Remove comment.

Review comments: skip the tests that require an available audio input if none is available.
2016-02-17 14:53:51 +01:00
Paul Adenot 9908ee192f Add a smoke test for input-only streams.
This only checks we have non-silence audio for 500ms.
2016-02-06 06:29:26 +01:00