57 Commits

Author SHA1 Message Date
andrew@webrtc.org
bd8c865f43 Remove build-time beamformer flags.
RealFourier is now unconditionally enabled since we can fall back to the
Ooura FFT. We no longer need to condition users on rtc_use_openmax_dl.

R=aluebs@webrtc.org, mgraczyk@google.com

Review URL: https://webrtc-codereview.appspot.com/50439004

Cr-Commit-Position: refs/heads/master@{#8799}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8799 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-20 00:28:42 +00:00
mgraczyk@chromium.org
0f663de2ec Rename Beamformer to NonlinearBeamformer.
R=aluebs@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/42359004

Cr-Commit-Position: refs/heads/master@{#8710}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8710 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-13 00:14:18 +00:00
mgraczyk@chromium.org
e534086492 Clean up LappedTransform and Blocker.
- Remove unnecessary window member from lapped_transform.
  - Add comment indicated that Blocker does not take ownership of
    the window passed to its constructor.
  - Streamline LappedTransform constructor so members can be const.

Also use a range-based for loop in audio_processing_impl.cc for clarity.

R=aluebs@webrtc.org, andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41229004

Cr-Commit-Position: refs/heads/master@{#8708}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8708 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-12 23:24:19 +00:00
kjellander@webrtc.org
14665ff7d4 Roll chromium_revision e144d30..6fdb142 (318658:318841) + remove OVERRIDE macro
Clang version changed 223108:230914
Details: e144d30..6fdb142/tools/clang/scripts/update.sh

Removes the OVERRIDE macro defined in:
* webrtc/base/common.h
* webrtc/typedefs.h

The majority of the source changes were done by running this in src/:
perl -0pi -e "s/virtual\s([^({;]*(\([^({;]*\)[^({;]*))(OVERRIDE|override)/\1override/sg" `find {talk,webrtc} -name "*.h"  -o -name "*.cc*" -o -name "*.mm*"`

which converted all:
virtual Foo() OVERRIDE
functions to:
Foo() override

Then I manually edited:
* talk/media/webrtc/fakewebrtccommon.h
* webrtc/test/fake_common.h

Remaining uses of OVERRIDE was fixed by search+replace.

Manual edits were done to fix virtual destructors that were
overriding inherited ones.

Finally a build error related to the pure virtual definitions of
Read, Write and Rewind in common_types.h required a bit of
refactoring in:
* webrtc/common_types.cc
* webrtc/common_types.h
* webrtc/system_wrappers/interface/file_wrapper.h
* webrtc/system_wrappers/source/file_impl.cc

This roll should make it possible for us to finally re-enable deadlock
detection for TSan on the buildbots.

BUG=4106
R=pbos@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41069004

Cr-Commit-Position: refs/heads/master@{#8596}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8596 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-04 13:04:54 +00:00
aluebs@webrtc.org
c9ce07ed87 Add Config option to enable 48kHz support in AudioProcessing
BUG=webrtc:3146
R=andrew@webrtc.org, bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/45389004

Cr-Commit-Position: refs/heads/master@{#8563}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8563 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-02 20:07:51 +00:00
aluebs@webrtc.org
3aca0b0b31 Add 48kHz support to Beamformer
Doing something similar for the band 16-24kHz to what is done for the band 8-16kHz
Tested for 32kHz sample rate and the output is bitexact with how it was before this CL.

BUG=webrtc:3146
R=andrew@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35159004

Cr-Commit-Position: refs/heads/master@{#8522}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8522 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-26 21:53:00 +00:00
aluebs@webrtc.org
d35a5c3506 Make ChannelBuffer aware of frequency bands
Now the ChannelBuffer has 2 separate arrays, one for the full-band data and one for the splitted one. The corresponding accessors are added to the ChannelBuffer.
This is done to avoid having to refresh the bands pointers in AudioBuffer. It will also allow us to have a general accessor like data()[band][channel][sample].
All the files using the ChannelBuffer needed to be re-factored.
Tested with modules_unittests, common_audio_unittests, audioproc, audioproc_f, voe_cmd_test.

R=andrew@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36999004

Cr-Commit-Position: refs/heads/master@{#8318}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8318 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-10 22:52:43 +00:00
bjornv@webrtc.org
63da1dd972 audio_processing: Now records mic volume level also when using new AGC
Previously only mic level calculated by the legacy agc was logged in aecdebug dumps.
Now we log it for any agc.
In addition, it is now possible to turn on and off debug recording in the test tool voe_cmd_test.

BUG=4274
TESTED=verified using voe_cmd_test
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39839004

Cr-Commit-Position: refs/heads/master@{#8274}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8274 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-06 19:44:46 +00:00
kjellander@webrtc.org
035e9123e9 Move channel_buffer.{h,cc} to common_audio.
In https://code.google.com/p/webrtc/source/detail?r=8166
I added a check preventing GYP files from referencing
sources above their directory level.
This CL fixes the disallowed reference added in
https://code.google.com/p/webrtc/source/detail?r=8157
by moving channel_buffer.{h,cc} to common_audio for real.

BUG=4185
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35939004

Cr-Commit-Position: refs/heads/master@{#8190}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8190 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-28 19:57:44 +00:00
aluebs@webrtc.org
d82f55d2a7 Only adapt AGC when the desired signal is present
Take the 50% quantile of the mask and compare it to certain threshold to determine if the desired signal is present. A hold is applied to avoid fast switching between states.
is_signal_present_ has been plotted and looks as expected. The AGC adaptation sounds promising, specially for the cases when the speaker fades in and out from the beam direction.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/28329005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8078 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-15 18:07:21 +00:00
kwiberg@webrtc.org
2ebfac5649 Remove COMPILE_ASSERT and use static_assert everywhere
COMPILE_ASSERT is no longer needed now that we have C++11's
static_assert.

R=aluebs@webrtc.org, andrew@webrtc.org, hellner@chromium.org, henrike@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39469004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8058 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-14 10:51:54 +00:00
mgraczyk@chromium.org
d6e84d9d13 Always copy processed audio to output buffer in ProcessStream.
In the old AudioFrame ProcessStream API, input and output buffers were shared.
Now that the buffers are distinct, the input must be copied to the
output even when no processing occurred.

R=andrew@webrtc.org

Committed: https://code.google.com/p/webrtc/source/detail?r=78de5010d167d1e375e05d26177aad43c2e2de08

Review URL: https://webrtc-codereview.appspot.com/41459004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8052 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-14 01:33:54 +00:00
kwiberg@webrtc.org
3df38b442f Unify the two copies of compile_assert.h
This patch basically deletes webrtc/base/compile_assert.h (which is
the more outdated copy) and moves
webrtc/system_wrappers/source/compile_assert.h to take its place.

R=aluebs@webrtc.org, andrew@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36719004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8048 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-13 11:37:48 +00:00
andrew@webrtc.org
46323b3786 Remove useless AudioProcessing::Create() overload.
R=aluebs@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36739004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8046 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-13 06:48:06 +00:00
aluebs@webrtc.org
fb7a039e9d Use array geometry in Beamformer
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35559004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8000 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-05 21:58:58 +00:00
aluebs@webrtc.org
ae643ce280 Wire up Beamformer in AudioProcessing
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38449004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7969 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-19 19:57:34 +00:00
pbos@webrtc.org
788acd17ad Merge audio_processing changes.
R=aluebs@webrtc.org, bjornv@webrtc.org
BUG=

Review URL: https://webrtc-codereview.appspot.com/32769004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7893 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-15 09:41:24 +00:00
aluebs@webrtc.org
27d106bcf7 Move the downmixing out of AudioBuffer
This provides more flexibility if some component in AudioProcessing wants to operate before downmixing.
Now the AudioProcessing does only track the processing rate, but not the processing number of channels. This is tracked by the AudioBuffer itself and can be changed at any time to one smaller or equal the input number of channels. For each chunk it is reset to input number of channels and the end it should be equal to the output number of channels.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/28169004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7879 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-11 17:09:21 +00:00
aluebs@webrtc.org
8789376cd3 Move ChannelBuffer class to channel_buffer file
No change in functionallity.

BUG=webrtc:3146
R=andrew@webrtc.org, bjornv@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/28109004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7760 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-27 23:40:25 +00:00
aluebs@webrtc.org
087da13fe8 Add empty 3 band splitting filter API
This is only an empty API that will never be used. For now is 48kHz not supported in AudioProcessing. For that it needs to be added in InitializeLocked. But before the 3 band filter bank needs to be populated.

BUG=webrtc:3146
R=bjornv@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/30139004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7715 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-17 23:01:23 +00:00
aluebs@webrtc.org
be05c74ec8 Wrap the splitting filter in its own class
This doesn't change the behavior at all.
The logic behind this is having one class which manages all the splitting filters, because in the future we plan to add a 3 band one for 48kHz support.
It also breaks the dependency of the AudioBuffer with the filter states of these filters (which are going to be different for the 3 band one). The AudioBuffer is complicated enough and is going to need changes to support 3 bands in the future, so any simplification is a good idea.
On top of that it eliminates repeated code in the APM (now only iterating over channels, but then also deciding in how many bands to split). This should be managed by the AudioBuffer directly.

BUG=webrtc:3146
R=bjornv@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/32469004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7705 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-14 22:18:10 +00:00
xians@webrtc.org
e46bc77e94 Reland 28629004: adding new AEC dump start interface for chrome.
This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
http://msdn.microsoft.com/en-us/library/ms235460.aspx

R=andresp@webrtc.org, andrew@webrtc.org, bjornv@webrtc.org, henrike@webrtc.org, henrikg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/30629004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7418 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-10 08:36:56 +00:00
xians@webrtc.org
79a7148108 Revert 7337 "Reland 28629004: adding new AEC dump start interfac..."
> Reland 28629004: adding new AEC dump start interface for chrome
> 
> adding new AEC dump start interface for chrome.
> 
> This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
> http://msdn.microsoft.com/en-us/library/ms235460.aspx
> 
> Chromium bug:crbug/415935
> TEST=bots
> R=bjornv@webrtc.org, kwiberg@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/27639004

TBR=xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/22849004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7342 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 15:29:13 +00:00
xians@webrtc.org
14092e00f1 Reland 28629004: adding new AEC dump start interface for chrome
adding new AEC dump start interface for chrome.

This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
http://msdn.microsoft.com/en-us/library/ms235460.aspx

Chromium bug:crbug/415935
TEST=bots
R=bjornv@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/27639004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7337 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 14:35:15 +00:00
xians@webrtc.org
875206196c Revert 7334 "adding new AEC dump start interface for chrome."
> adding new AEC dump start interface for chrome.
> 
> This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
> http://msdn.microsoft.com/en-us/library/ms235460.aspx
> 
> Chromium bug:crbug/415935
> TEST=bots
> R=bjornv@webrtc.org, kwiberg@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/28629004

TBR=xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/26659004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7335 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 13:30:05 +00:00
xians@webrtc.org
2e417d6428 adding new AEC dump start interface for chrome.
This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
http://msdn.microsoft.com/en-us/library/ms235460.aspx

Chromium bug:crbug/415935
TEST=bots
R=bjornv@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/28629004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7334 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-30 13:11:27 +00:00
andrew@webrtc.org
30be827e6a Enable render downmixing to mono in AudioProcessing.
In practice, we have been doing this since time immemorial, but have
relied on the user to do the downmixing (first voice engine then
Chromium). It's more logical for this burden to fall on AudioProcessing,
however, who can be expected to know that this is a reasonable approach
for AEC. Permitting two render channels results in running two AECs
serially.

Critically, in my recent change to have Chromium adopt the float
interface:
https://codereview.chromium.org/420603004
I removed the downmixing by Chromium, forgetting that we hadn't yet
enabled this feature in AudioProcessing. This corrects that oversight.

The change in paths hit by production users is very minor. As commented
it required adding downmixing to the int16_t path to satisfy
bit-exactness tests.

For reference, find the ApmTest.Process errors here:
https://paste.googleplex.com/6372007910309888

BUG=webrtc:3853
TESTED=listened to the files output from the Process test, and verified
that they sound as expected: higher echo while the AEC is adapting, but
afterwards very close.

R=aluebs@webrtc.org, bjornv@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/31459004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7292 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-24 20:06:23 +00:00
aluebs@webrtc.org
a0ce9fa2a6 Call NS AnalyzeCaptureAudio before AEC
This attenuates the noise pumping generated from the NS adapting to the AEC comfort noise.

When there is echo present the AEC suppresses it and adds comfort noise. This is underestimated on purpose to avoid adding more than the original background noise. The NS has to be called after the AEC, because every non-linear processing before it can ruin its performance. Therefore the noise estimation can adapt to this comfort noise, making it less aggressive and generating noise pumping.

By putting the noise estimation analysis stage from the NS before the AEC, this effect can be avoided. This has been tested manually on recordings where noise pumping was present: Two long recordings done in our team by bjornv and kwiberg plus the most noisy (5) recordings in the QA set.

On the other hand, one risk of doing this is to not adapt to the comfort noise and therefore suppress too much. As verified in the tested files, this is not a problem in practice.

BUG=webrtc:3763
R=andrew@webrtc.org, bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/24679004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7289 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-24 14:18:03 +00:00
aluebs@webrtc.org
fda2c2e810 Add Analyze API to NS
This adds an empty API.
In a next CL I will separate the noise estimation from the Process API and fill this function.

BUG=webrtc:3811
R=bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/23599004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7218 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-18 09:54:06 +00:00
aluebs@webrtc.org
59a1b1b928 Fix the different samples per channel in aecdump
BUG=webrtc:3359
R=bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/15299004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6996 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-28 10:43:09 +00:00
aluebs@webrtc.org
224a140339 Make experimental NS API not purely virtual
Because not all subclasses will want to bother overriding these methods.

R=bjornv@webrtc.org, kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/18689004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6592 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-07-03 13:41:39 +00:00
andrew@webrtc.org
103657b484 Add keyboard channel support to AudioBuffer.
Also use local aliases for AudioBuffers for brevity.

BUG=2894
R=aluebs@webrtc.org, bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/13369005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5973 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-24 18:28:56 +00:00
andrew@webrtc.org
46b31b17df Restore sample_rate_hz() until Chromium is updated to not use it.
TBR=bjornv
TESTED=Chromium builds against webrtc head.
BUG=2894

Review URL: https://webrtc-codereview.appspot.com/12349004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5962 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-23 03:33:54 +00:00
andrew@webrtc.org
ddbb8a2c24 Support arbitrary input/output rates and downmixing in AudioProcessing.
Select "processing" rates based on the input and output sampling rates.
Resample the input streams to those rates, and if necessary to the
output rate.

- Remove deprecated stream format APIs.
- Remove deprecated device sample rate APIs.
- Add a ChannelBuffer class to help manage deinterleaved channels.
- Clean up the splitting filter state.
- Add a unit test which verifies the output against known-working
native format output.

BUG=2894
R=aluebs@webrtc.org, bjornv@webrtc.org, xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9919004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5959 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-22 21:00:04 +00:00
andrew@webrtc.org
a8b97373d5 Add tests and modify tools for new float deinterleaved interface.
- 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
2014-03-10 22:26:12 +00:00
andrew@webrtc.org
17e40641b3 Add a deinterleaved float interface to AudioProcessing.
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
2014-03-04 20:58:13 +00:00
andrew@webrtc.org
56e4a05053 Remove ProcessingComponent's dependence on AudioProcessingImpl.
- Move needed accessors to AudioProcessing.
- Inject the crit directly as a dependency.
- Remove the now unneeded EchoCancellationImplWrapper.

BUG=2894
R=aluebs@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9199004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5620 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-27 22:23:17 +00:00
andrew@webrtc.org
f92aaff104 AudioProcessing is not a Module.
Remove Module as the base class of AudioProcessing. The inherited
methods were all no-ops.

TBR=bjornv

Review URL: https://webrtc-codereview.appspot.com/8779004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5556 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-15 04:22:49 +00:00
andrew@webrtc.org
38bf249049 Initialize output_will_be_muted_.
TBR=aluebs

Review URL: https://webrtc-codereview.appspot.com/8659004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5546 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-13 17:43:44 +00:00
andrew@webrtc.org
17342e5092 Add a method to inform AudioProcessing that its output will be muted.
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/8559004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5538 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-12 22:28:31 +00:00
andrew@webrtc.org
07b5950c12 Initialize key_pressed_.
Was resulting in an error on Mac Asan:
[ RUN      ] ApmTest.DebugDump
[libprotobuf FATAL ../../third_party/protobuf/src/google/protobuf/message_lite.cc:224] CHECK failed: !coded_out.HadError():

TBR=aluebs

Review URL: https://webrtc-codereview.appspot.com/8539004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5536 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-12 16:41:13 +00:00
andrew@webrtc.org
ce8e077cf0 Add a keypress field to the audioproc debug proto.
Log the value in AudioProcessing, and unpack it to a new file in the
unpacking tool.

TESTED=
- The new tool can unpack old dumps.
- The old tool can unpack new dumps (without keypress.bool).
- Unpacking a new dump from voe_cmd_test produces a keypress.bool that
appears correct when examined.

R=aluebs@webrtc.org, bjornv@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/8509005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5535 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-12 15:28:30 +00:00
andrew@webrtc.org
75dd2885c5 Add an interface for accepting keypress signals to AudioProcessing.
R=aluebs@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/8429004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5529 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-02-11 20:52:30 +00:00
andrew@webrtc.org
e84978f3d8 Add a Config parameter to AudioProcessing::Create().
Also add a parameter-less version; the (int) version is deprecated and
should be removed.

TBR=aluebs,bjornv
BUG=2844

Review URL: https://webrtc-codereview.appspot.com/7609004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5431 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-25 02:09:06 +00:00
andrew@webrtc.org
60730cfe3c Remove the requirement to call set_sample_rate_hz and friends.
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
2014-01-07 17:45:09 +00:00
henrikg@webrtc.org
863b536100 Allow opening an AEC dump from an existing file handle.
This is necessary for Chromium to be able enable the dump with the sanbox enabled. It will open the file in the browser process and pass the handle to the render process.

This changes FileWrapper to deal with the case were the file handle is not managed by the wrapper.

BUG=2567
R=andrew@webrtc.org, henrika@webrtc.org, perkj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/4649004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5239 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-06 16:05:17 +00:00
aluebs@webrtc.org
0b72f5863b Add experimental noise suppression dummy API.
Add this flag to the voe_cmd_test.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/3879004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5134 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-19 15:17:51 +00:00
andrew@webrtc.org
621df678c8 WEBRTC_{BIG, LITTLE}_ENDIAN -> WEBRTC_ARCH_{BIG, LITTLE}_ENDIAN.
Mostly to remove a long-standing TODO...

TESTED=trybots
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2369005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5013 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-22 10:27:23 +00:00
andrew@webrtc.org
f3930e941c Small refactoring of AudioProcessing use in channel.cc.
- Apply consistent naming.
- Use a scoped_ptr for rx_audioproc_.
- Remove now unnecessary AudioProcessing::Destroy().

R=bjornv@webrtc.org, xians@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2184007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4784 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-18 22:37:32 +00:00
pbos@webrtc.org
9162080527 Fix some chromium-style warnings in webrtc/modules/audio_processing/
BUG=163
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1902004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4472 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-02 11:44:11 +00:00