r4374 was mistakenly committed to stable, so this is to re-merge back to trunk.
Store the sequence number in StopSend() and resume it in StartSend().
When restarting the microphone device, we call StopSend() first, then
StartSend() later. Since we reset sequence number in StopSend(), it sometimes
causes libSRTP to complain about packets being replayed. Libjingle work around
it by caching the sequence number in WebRtcVoiceEngine.cc, and call
SetInitSequenceNumber() to resume the sequence number before StartSend().Store the sequence number in StopSend() and resume it in StartSend().
When restarting the microphone device, we call StopSend() first, then
StartSend() later. Since we reset sequence number in StopSend(), it sometimes
causes libSRTP to complain about packets being replayed. Libjingle work around
it by caching the sequence number in WebRtcVoiceEngine.cc, and call
SetInitSequenceNumber() to resume the sequence number before StartSend().
This patch fixes this problem by storing the sequence number in StopSend(), and
resume it in StartSend(). So that we can remove the workaround in libjingle.
BUG=2102
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1922004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4451 4adac7df-926f-26a2-2b94-8c16560cd09d
r4326 was mistakenly committed to stable, so this is to re-merge back to trunk.
Fixed the AGC and interface problems on the new path.
In order to make the AGC work properly, we need to cache the volume value passed
by the callback, compare it with the value returned by
shared->transmit_mixer()->CaptureLevel(). If they are the same, we need to
return 0 to indicate no volume needs changing, otherwise return the new volume.
By doing this, we avoid setting the volume all the same, which allows the users
to change the volume manually.
This patch also fixes some minor issues with the interfaces too: make the int
channel[] const, and correct the order of the input params in
channel::Demultiplex.
R=tommi@webrtc.org
BUG=[2134]
TEST=compile && manual AGC test
Review URL: https://webrtc-codereview.appspot.com/1921004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4450 4adac7df-926f-26a2-2b94-8c16560cd09d
r4326 was mistakenly committed to stable, so this is to re-merge back to trunk.
Add new interface to support multiple sources in webrtc.
CaptureData() will be called by chrome with a flag |need_audio_processing| to
indicate if the data needs to be processed by APM or not. Different from the old
interface that will send the data to all voe channels, the new interface will
specify a list of voe channels that the data is demultiplexing to.
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1919004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4449 4adac7df-926f-26a2-2b94-8c16560cd09d
This is the conversation I had with Henrik Lundin regarding this problem.
Me:
In Expand::AnalyseSignal() we compute correlation and distortion, then calculate the ratio of correlation to distortion. There if distortion is zero we expect that correlation to be zero. Although in practice this might be true, I suppose we rarely hit into absolutely periodic signal, but in one of the tests the assertion in line 455 of expand.cc was triggered. The distortion is computed over a shorter length of the signal, while correlation is computed over longer segments. Therefore, I guess, if the signal has just enough zeros at the beginning we can end up in situation that distortion is zero but not the correlation. Do you agree? I didn't have time to attempt to solve this, but if my line of thought is correct, we should not have that assert. Perhaps, if correlation is zero we set the ratio to 0, otherwise, ratio would be the largest value of its own type. Any thoughts?
Henrik:
I agree with you. Go ahead with your solution.
R=minyue@google.com
Review URL: https://webrtc-codereview.appspot.com/1888006
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4448 4adac7df-926f-26a2-2b94-8c16560cd09d
Now that these scripts are called from browser tests, we need to print everything on stdout since the tests will throw away stderr when invoking programs. I chose to assign sys.stderr to sys.stdout. Otherwise I would have missed stuff like parser.error, which print to stderr.
The error message will get improved because the old code did not catch the case when the binary was missing, which lead to a very confusing error when that was the case. This gets fixed now.
BUG=
R=kjellander@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1886004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4416 4adac7df-926f-26a2-2b94-8c16560cd09d
Replace the BlockSize() workaround we were using previously to support
the push wrapper with the upstream request_frames interface. This
requires a bit of a trick to ensure we don't add more delay than
necessary. On the first pass we use a dummy Resample() call in order to
prime the buffer such that all later calls only require a single input
request through Run().
Notably, this brings in an optimized loop condition, improving
performance by ~2% - 3% on tested platforms and avoids a 20% performance
hit with clang. This addresses issue2041.
Only negligible changes to the PushSincResamplerTest SNR thresholds, due
to a fractional sample adjustment in output delay.
This still retains the per-instance CPU detection, as webrtc lacks a
LazyInstance helper for static initialization.
Ideally, we would adopt SetRatio() in PushSincResampler's
InitializeIfNeeded() for on-the-fly changes, but this will require a way
to update request_frames.
The diff against Chromium upstream is available here:
https://codereview.chromium.org/19470003
BUG=2041
TESTED=unit tests, voe_cmd_test in loopback running through all codecs
with 44.1 kHz and 48 kHz device formats using a stereo mic.
R=dalecurtis@chromium.org
Review URL: https://webrtc-codereview.appspot.com/1838004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4406 4adac7df-926f-26a2-2b94-8c16560cd09d