aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_resampler.h
AgeCommit message (Collapse)Author
2022-03-08Add a parameter to cubeb_resampler_create to enable reclockingPaul Adenot
2021-07-28Run .clang-formatChun-Min Chang
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 ```
2017-10-27Update comments in cubeb-resampler.hBryce Van Dyk
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.
2016-02-06Expose the new duplex resampler in the C APIPaul Adenot
This also adds a member to the C API, to know the resampler latency. For now, this is mainly used for testing. The C API is using `cubeb_params.format` to know the type of the buffers, and uses `void*` pointer. Right after the C layer, everything is casted properly to the right types, and templates are used to make sure we're using the right functions.
2016-01-13Preparatory work for the input and duplex codePaul Adenot
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>
2014-12-15strip unnecessary +x from some files.Matthew Gregan
2014-09-19Brought in missing files from the Mozilla versionAustin Hicks