aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/common.h
AgeCommit message (Collapse)Author
2023-11-10Include gtest.h in test/common.hPaul Adenot
2023-11-10Non-functional change: Directly include string.h in test/common.hPaul Adenot
2023-11-10Non-functional change: clang-format testsPaul Adenot
2023-04-26Prevent running test that make use of audio input streams on backends that ↵Paul Adenot
don't implement it
2023-04-20Sync back BMO#1825328Paul Adenot
https://bugzilla.mozilla.org/show_bug.cgi?id=1825328 landed in Firefox without going through upstream. It's necessary to build in an environment where gtests are all compiled in the same executable. Original patch by serge-sans-paille <[email protected]>.
2018-10-18 tests: check correctly the audio buffer values range (BMO 1484541). (#461)Alex Chronopoulos
* 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-03-21wasapi: Remove COM initialization and require caller to complete.Matthew Gregan
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.
2018-03-19Multi-channels support for windows/mac/linux (#426)Jean-Yves Avenard
* 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.
2017-06-02Fix test_mixer fails on local build (#316)Chun-Min Chang
* Fix test_mixer on OS X * Fix warnings of comparison of integers of different signs: 'long' and 'unsigned long' * Add debugging messages for test_mixer * Move channel_names from common.h to test_mixer.cpp * Explain why we need an extra assertion
2017-05-25Rework device collection (#309)Dan Glastonbury
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.
2017-05-23Add backend specification support to common.hDan Glastonbury
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-22Push destroy fns to backend (#302)Dan Glastonbury
* 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
2017-05-22Fix memory leaks in tests.Dan Glastonbury
2017-04-06Replace cubeb_cleaner and cubeb_stream_cleaner by unique_ptrChun-Min Chang
2017-04-06Using RAII helpers for cubeb context and stream but leaving test_sanity for ↵Chun-Min Chang
explicit flow control
2017-02-06Fix test compilation when compiling inside Gecko.Paul Adenot
2017-02-06tests: add log method in common and set callback in test_recordAlex Chronopoulos
2016-12-22Warning fixes for cubeb_wasapi and changes from PR #171.Chun-Min Chang
2016-12-20Support multiple channels on Windows (#171)Chun-Min Chang
* Multiple channel support on Windows * Move up/down mixing code from cubeb_wasapi.cpp to standalone cubeb_mixer.cpp
2016-11-11Add missing include guard to test/common.h.Matthew Gregan
2016-10-17Revert "opensl: Implement capture and full-duplex streams."Paul Adenot
This reverts commit d880e44e192520fb7c1ed5a240d52d22972eb892.
2016-09-22opensl: Implement capture and full-duplex streams.Alex Chronopoulos
Closes #114.
2016-02-17Address review comments.Paul Adenot
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.
2014-02-26Some more change to support testingPaul Adenot
- put the `delay` function in the header to make it easy to write gecko tests - add a test to test new cubeb API function - update tests so they pass on every platform - fix the bustage caused by the previous patch
2013-08-31Move 'delay' function and M_PI definition to a shared fileSebastien Alaiwan