- Add an Initialize() overload to allow specification of format
parameters. This is mainly useful for testing, but could be used in
the cases where a consumer knows the format before the streams arrive.
- Add a reverse_sample_rate_hz_ parameter to prepare for mismatched
capture and render rates. There is no functional change as it is
currently constrained to match the capture rate.
- Fix a bug in the float dump: we need to use add_ rather than set_.
- Add a debug dump test for both int and float interfaces.
- Enable unpacking of float dumps.
- Enable audioproc to read float dumps.
- Move more shared functionality to test_utils.h, and generally tidy up
a bit by consolidating repeated code.
BUG=2894
TESTED=Verified that the output produced by the float debug dump test is
correct. Processed the resulting debug dump file with audioproc and
ensured that we get identical output. (This is crucial, as we need to
be able to exactly reproduce online results offline.)
R=aluebs@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/9489004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5676 4adac7df-926f-26a2-2b94-8c16560cd09d
This is mainly to support the native audio format in Chrome. Although
this implementation just moves the float->int conversion under the hood,
we will transition AudioProcessing towards supporting this format
throughout.
- Add a test which verifies we get identical output with the float and
int interfaces.
- The float and int wrappers are tasked with conversion to the
AudioBuffer format. A new shared Process/Analyze method does most of
the work.
- Add a new field to the debug.proto to hold deinterleaved data.
- Add helpers to audio_utils.cc, and start using numeric_limits.
- Note that there was no performance difference between numeric_limits
and a literal value when measured on Linux using gcc or clang.
BUG=2894
R=aluebs@webrtc.org, bjornv@webrtc.org, henrikg@webrtc.org, tommi@webrtc.org, turaj@webrtc.org, xians@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/9179004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5641 4adac7df-926f-26a2-2b94-8c16560cd09d
Voice engine shouldn't really have to manage this. Instead, have AGC
keep track of the last input volume, so that it can avoid getting stuck
under coarsely quantized conditions.
Add a test to verify the behavior.
TESTED=unittests, and observed that AGC didn't get stuck on a MacBook
where this problem can actually occur.
R=bjornv@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/8729004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5571 4adac7df-926f-26a2-2b94-8c16560cd09d
This will allow an embedder to use it directly.
Adding inertia/hangover time between updates of the reported detection status to the algorithm, controlled by a parameter. That is usually desired and this way a consumer of
the class don't have to implement that. (VoiceEngine will let it be 1, which results in the same behavior as before, and keep controlling the hangover itself.)
R=andrew@webrtc.org, niklas.enbom@webrtc.org, xians@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/6219004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5462 4adac7df-926f-26a2-2b94-8c16560cd09d
Recordings that had a AnalyzeReverseStream() call prior to ProcessStream() where aborted due to sample rates being set upon call by ProcessStream(). That change was done in r5346.
Before we have a smarter handling on how to set sample rate automatically, this CL adds back that setting.
BUG=
TESTED=trybots, modules_unittests
R=andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/7189004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5394 4adac7df-926f-26a2-2b94-8c16560cd09d
In addition to unittests a cast losing constness was corrected.
The tests added are:
1. Adjusting allowed_offset when robust validation is disabled should have no impact.
2. For noise free signals there should be no difference between robust validation or not.
3. Robust validation acts faster during startup.
BUG=None
TESTED=modules_unittests, trybots
R=aluebs@webrtc.org, andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/6789004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5361 4adac7df-926f-26a2-2b94-8c16560cd09d
Instead have ProcessStream transparently handle changes to the stream
audio parameters (sample rate and channels). This removes two locks
per 10 ms ProcessStream call taken by VoiceEngine (four total with the
audio level indicator.)
Also, prepare future improvements by having the splitting filter take
a length parameter. This will allow it to work at different sample
rates. Remove the useless splitting_filter wrapper.
TESTED=voe_cmd_test with audio processing enabled and switching between
codecs; unit tests.
R=aluebs@webrtc.org, bjornv@webrtc.org, turaj@webrtc.org, xians@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/3949004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5346 4adac7df-926f-26a2-2b94-8c16560cd09d
Added is
- a member variable for turning robust validation on and off.
- API to enable/disable feature.
- API to check if enabled.
- unit tests for these APIs.
Not added is
- the actual functionality (separate CL), hence turning feature on/off has no impact currently.
- calls in AEC and AEC, where the delay estimator is used. This is also done in a separate CL when we know if it should be turned on in both components.
TESTED=trybots, module_unittest
BUG=
R=aluebs@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/4609005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5191 4adac7df-926f-26a2-2b94-8c16560cd09d
I don't believe I've witnessed this "feature" ever provide a benefit,
and have now collected some evidence of its harm when using the
extended filter mode. It can cause erroneous resets in two cases:
1. Some preprocessing noise suppression is enabled in the system (i.e.
"audio enhancements") that push the noise floor very low, possibly to
zero. If the filter is non-zero this condition can be triggered very
easily, and erroneously.
2. Non-zero energy in the filter before the peak impulse response can
cause a slight (and harmless) "pre-echo" in the error signal. This
becomes more significant as the peak is set further back in the filter.
This effect can cause needless resets during echo onsets.
In short, this isn't a great criterion for filter reset and has the
potential to cause serious harm. Ideally we would remove it entirely,
but in the interests of safety, can start with the extended mode.
BUG=1261
R=aluebs@webrtc.org, bjornv@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/3959004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5159 4adac7df-926f-26a2-2b94-8c16560cd09d