52 Commits

Author SHA1 Message Date
aleloi
9561183708 Changed mixing to be done at the minimal possible frequency.
This change changes mixing to be done at the lowest possible
APM-native rate that does not lead to quality loss. An Audio
Processing-native rate is one of 8, 16, 32, or 48 kHz. Mixing at a
lower sampling rate and avoiding resampling can in many cases lead to
big efficiency improvements, as reported by experiments.

This CL also fixes a design issue with the AudioMixer: audio at
non-native rates is no longer fed to the APM instance which is the
limiter.

NOTRY=True
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2458703002
Cr-Commit-Position: refs/heads/master@{#14980}
2016-11-08 14:39:58 +00:00
aleloi
051f678808 Add a NeededFrequency() method to the AudioMixer::Source interface.
This change will allow for a audio source to report its sampling rate
to the audio mixer. It is needed in order to mix at a lower sampling
rate. Mixing at a lower sampling rate can in many cases lead to big
efficiency improvements, as reported by experiments.

The code affected is all implementations of the Source interface:
AudioReceiveStream and a mock class. The AudioReceiveStream now
queries its underlying voe::Channel object for the needed frequency.

Note that the changes to the mixing algorithm are done in a later CL.

BUG=webrtc:6346
NOTRY=True
TBR=solenberg@webrtc.org

Review-Url: https://codereview.webrtc.org/2448113009
Cr-Commit-Position: refs/heads/master@{#14839}
2016-10-31 10:26:48 +00:00
kjellander
6ceab08322 GN: New conventions, default target and refactorings
Introduce a convention on categorizing GN targets:
1. Production code
2. Tests
3. Examples
4. Tools
The first two have targets spread out all over the tree,
while the latter are isolated to examples/ and tools/ directories.

Another new convention: Each directory's BUILD.gn file shall contain
a target named similar to the directory name. This target shall
contain the 'most common' production code, i.e. so that most
consumers of the directory can depend on only the directory
(which implicitly means that target in GN).

//webrtc:webrtc_tests is changed to depend on all WebRTC tests.
From now on, it's necessary to add new test targets to this dependency
tree in order to get them compiled.

Two new group targets are created:
//webrtc/modules/audio_coding:audio_coding_tests
//webrtc/modules/audio_processing:audio_processing_tests
to reduce the long list of tests in //webrtc:webrtc_tests.

Visibility on //webrtc:webrtc and  //webrtc:webrtc_tests is restricted
to the root target, to avoid circular dependencies due to the monolithic
property of these targets (a problem we've had in the past).

The 'root' target at the top level is renamed to 'default', which means GN will
build this target instead of _all_ generated targets
(see https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/faq.md#Can-I-control-what-targets-are-built-by-default).
This target now depends on everything we want to build, meaning all targets now
explicitly needs to be wired up from the root target in order to get build.
Having this, the number of compiled objects on Android is decreased from 8855 to 6276. It also gives us better control over our build.

BUG=webrtc:6440
TESTED=git cl try --clobber
NOTRY=True

Review-Url: https://codereview.webrtc.org/2441383002
Cr-Commit-Position: refs/heads/master@{#14821}
2016-10-28 12:44:07 +00:00
aleloi
1655e45d85 Elimiteted race condition in the AudioMixer.
The mixer allocates an audio frame for each added data source. This
audio frame was deallocated when a source was removed from the
mixer. Source removal could happen during the mixing, and the existing
locking scheme (and the Clang thread checker) was not sufficient to
prevent a data race.

After this change, the mixer doesn't release its lock until it is
finished with the sources' Audio frames. Since multi-threaded access to
the mixer only happens when a source is added or removed, we believe
that this change wouldn't have any noticeable performance impact.

NOTRY=True

BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2439283002
Cr-Commit-Position: refs/heads/master@{#14744}
2016-10-24 13:57:03 +00:00
nisse
151572ba05 Delete unused class AudioSourceWithMixStatus.
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2437863003
Cr-Commit-Position: refs/heads/master@{#14728}
2016-10-24 07:11:59 +00:00
aleloi
6c278491ad Move audio frame memory handling inside AudioMixer.
Simplify the AudioMixer::Source interface and update the mixer
implementation to the new interface.

Instead of asking a mixer source to provide a pointer to an AudioFrame
during each mixing iteration, a mixer should supply a pointer to its
own AudioFrame.

This simplifies lifetime issues as sources do not give away an
internal pointer.

Implementation: when an audio source is added, the mixer allocates a
new AudioFrame. The audio frame is kept together in the internal class
SourceStatus together with the audio source pointer until the source
is removed.

NOTRY=True
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2420913002
Cr-Commit-Position: refs/heads/master@{#14713}
2016-10-20 21:24:46 +00:00
aleloi
920d30bc74 Replaced thread checker with race checker in AudioMixer.
This change is due to an incorrect understanding of the threading
model in Chrome. The new AudioMixer has a thread checker to ensure
that mixing is always done from a single thread. Mixing is done on the
Audio Output Thread. When run in Chrome, it can change. Even if the thread
changes, there is never more than one audio thread, and mixing is done
sequentially.

The threading checks and variable access checks are replaced with
rtc::RaceChecker counterparts.

NOTRY=True
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2437913003
Cr-Commit-Position: refs/heads/master@{#14712}
2016-10-20 21:23:30 +00:00
aleloi
201dfe90a7 Split audio mixer into interface and implementation.
The AudioMixer is now split in a mixer and audio source interface part, which has moved to webrtc/api, and a default implementation part, which lies in webrtc/modules.

This change makes it possible to create other mixer implementations and is a first step to facilitate passing down a mixer from outside of WebRTC.

It will also create less build dependencies when the new mixer has replaced the old one.

NOTRY=True
TBR=henrik.lundin@webrtc.org
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2411313003
Cr-Commit-Position: refs/heads/master@{#14705}
2016-10-20 12:06:44 +00:00
aleloi
116ec6da50 Implemented further mixer interface change suggestions from https://codereview.webrtc.org/2386383003/
Changed mixability status into AddSource/RemoveSource. Added 'ssrc()'
method to the MixerSource interface. Removed unnecessary member 'num_audio_sources_' and made the mixer be refcounted.

BUG=webrtc:6346
NOTRY=True

Review-Url: https://codereview.webrtc.org/2408683002
Cr-Commit-Position: refs/heads/master@{#14612}
2016-10-12 13:07:13 +00:00
aleloi
e97974d203 Cleanup of the mixer interface.
This implements some of the suggestions in https://codereview.webrtc.org/2386383003/, namely

* Removing anonymous mixing.
* Removing the volume meter.

BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2402283003
Cr-Commit-Position: refs/heads/master@{#14609}
2016-10-12 10:06:34 +00:00
aleloi
4b8bfb8ed3 Changed ramping functionality of the AudioMixer.
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2398083005
Cr-Commit-Position: refs/heads/master@{#14607}
2016-10-12 09:15:08 +00:00
aleloi
e89141500a Moved MixerAudioSource and removed audio_mixer_defines.h.
MixerAudioSource is moved to AudioMixerImpl::Source. Structures and methods of the MixerAudioSource interface have been renamed. The RemixFrame method has added checks and is moved to audio_frame_manipulator.h

BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2396803004
Cr-Commit-Position: refs/heads/master@{#14600}
2016-10-11 13:18:37 +00:00
aleloi
36542514f6 Reland of https://codereview.webrtc.org/2396483002/
LOG_T_F macro is not defined for chromium builds.

NOTRY=True
BUG=webrtc:6346
TBR=ivoc@webrtc.org

Review-Url: https://codereview.webrtc.org/2401603003
Cr-Commit-Position: refs/heads/master@{#14569}
2016-10-07 12:28:38 +00:00
aleloi
a485dabc78 Revert of Made MixerAudioSource a pure interface. (patchset #7 id:350001 of https://codereview.webrtc.org/2396483002/ )
Reason for revert:
breaks chromium FYI

Original issue's description:
> Made MixerAudioSource a pure interface.
>
> This required quite a few small changes in the mixing algorithm
> structure, the mixer interface and the mixer unit tests.
>
> BUG=webrtc:6346
>
> Committed: https://crrev.com/2ae5fdff86b784545cbd724de54bb5ffedde1adf
> Cr-Commit-Position: refs/heads/master@{#14567}

TBR=ivoc@webrtc.org,solenberg@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2394253003
Cr-Commit-Position: refs/heads/master@{#14568}
2016-10-07 12:04:58 +00:00
aleloi
2ae5fdff86 Made MixerAudioSource a pure interface.
This required quite a few small changes in the mixing algorithm
structure, the mixer interface and the mixer unit tests.

BUG=webrtc:6346

Review-Url: https://codereview.webrtc.org/2396483002
Cr-Commit-Position: refs/heads/master@{#14567}
2016-10-07 11:30:19 +00:00
mflodman
7056be937f Delete old video defines in engine config.
This CL deletes the old and not used video defines in
engine_configurations.h and pre-pends voice_ to indicate there are only
voice/audio defines left in the file.

BUG=none
R=solenberg@webrtc.org

Review URL: https://codereview.webrtc.org/2401673002 .

Cr-Commit-Position: refs/heads/master@{#14558}
2016-10-07 05:07:36 +00:00
aleloi
dc7669a8a6 This removes forward declarations, changes include order, changes integers to plain 'int', and changes static methods to non-members.
BUG=6346
NOTRY=True

Review-Url: https://codereview.webrtc.org/2302483002
Cr-Commit-Position: refs/heads/master@{#14494}
2016-10-04 11:06:28 +00:00
kwiberg
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
kwiberg
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +00:00
kjellander
b62dbbe985 GN: Change rtc_source_set targets --> rtc_static_library
This changes most non-test related rtc_source_set targets to be
rtc_static_library instead. Targets without any .cc files are excluded.
This should bring back the build behavior we used to have with GYP
(i.e. same symbols exported in the libjingle_peerconnection.a file, which
are used by some downstream projects).

After doing an Android build with these changes:
$ nm --defined-only -g -C out/Release/lib.unstripped/libjingle_peerconnection_so.so | grep -i createpeerconnectionf
00077c51 T Java_org_webrtc_PeerConnectionFactory_nativeCreatePeerConnectionFactory
$ nm --defined-only -g -C out/Release/obj/webrtc/api/libjingle_peerconnection.a | grep -i createpeerconnectionf
00000001 T webrtc::CreatePeerConnectionFactory(rtc::Thread*, rtc::Thread*, rtc::Thread*, webrtc::AudioDeviceModule*, cricket::WebRtcVideoEncoderFactory*, cricket::WebRtcVideoDecoderFactory*)
00000001 T webrtc::CreatePeerConnectionFactory()

See https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cookbook.md#Note-on-static-libraries
for more details on this.

NOTICE: This should be further cleaned up in the future, to reduce
binary bloat and unnecessary linking time. Right now it's more
important to restore the desired build output though.

BUG=webrtc:6410, chromium:630755

Review-Url: https://codereview.webrtc.org/2361623004
Cr-Commit-Position: refs/heads/master@{#14364}
2016-09-23 07:38:58 +00:00
Henrik Kjellander
a41c13e6a2 OWNERS: Make everyone able to change *.gn,*.gni files.
Project-wide change to make it possible for all team members
to do changes to GN files.

NOTRY=True
R=kwiberg@webrtc.org
TBR=henrika@webrtc.org

Review URL: https://codereview.webrtc.org/2320043002 .

Cr-Commit-Position: refs/heads/master@{#14163}
2016-09-09 12:51:48 +00:00
aleloi
a4c2106120 This CL contains the following small changes:
1. Use of const in all variable declarations where it is possible
2. Variable names and function arguments changed from CamelCase to match code style
3. A few stale comments removed.
4. Chromium clang plugin check added (now possible thanks to kwiberg@'s work on common.h)
5. Disallow constructor macros added.

NOTRY=true

Review-Url: https://codereview.webrtc.org/2294263002
Cr-Commit-Position: refs/heads/master@{#14120}
2016-09-08 08:25:50 +00:00
aleloi
652ac89c09 Simplifications of the mixing algorithm.
Methods are named more consistently and have a more consistent
signatures. The call structure of mixing is slightly
simplified. Anonymous participants are also ramped up.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2298163002
Cr-Commit-Position: refs/heads/master@{#14110}
2016-09-07 14:42:23 +00:00
aleloi
311525e715 Several lock acquisitions and one of the two lock members are removed. ENSURE_LOCKS_REQUIRED and CalledOnValidThread annotations are added.
NOTRY=True

Review-Url: https://codereview.webrtc.org/2286343002
Cr-Commit-Position: refs/heads/master@{#14106}
2016-09-07 13:13:16 +00:00
ehmaldonado
e9cc686293 GN Templates: Move common_inherited_config to the template.
Remove common_inherited_config from the targets and add it to the
template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2311843002
Cr-Commit-Position: refs/heads/master@{#14069}
2016-09-05 13:10:23 +00:00
ehmaldonado
7a2ce0b738 GN Templates: Move common_config to the template.
Remove common_config from the targets' config and add
it to the template instead.

BUG=webrtc:6187
NOTRY=True

Review-Url: https://codereview.webrtc.org/2300413002
Cr-Commit-Position: refs/heads/master@{#14063}
2016-09-05 08:35:48 +00:00
kjellander
c0f28be1ca Add kjellander@webrtc.org to more OWNERS for BUILD.gn files.
TBR=henrika@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2294883008
Cr-Commit-Position: refs/heads/master@{#14045}
2016-09-02 12:04:12 +00:00
ehmaldonado
38a2132b02 GN: Introduce templates.
Defines the rtc_executable, rtc_source_set, rtc_test and
rtc_static_library templates.

These templates provide no functionality yet, but will enable common
configuration to be introduced, avoiding repetition in every target

Changes summary:
- Prepend rtc_ to test, source_set, executable and static_library targets
- Change "configs -= [" to "suppressed_configs += ["
- Include webrtc/build/webrtc.gni where it wasn't included yet
- Delete import("//testing/test.gni"), since rtc_test makes it unnecessary.

BUG=webrtc:6187
TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2301053002
Cr-Commit-Position: refs/heads/master@{#14043}
2016-09-02 11:10:41 +00:00
aleloi
5d167d6829 Removals and renamings in the new audio mixer.
Removed the OutputMixer part of the new mixer and renamed the new
mixer from NewAudioConferenceMixer to AudioMixer.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2249213005
Cr-Commit-Position: refs/heads/master@{#13883}
2016-08-24 09:21:00 +00:00
aleloi
30be5d7cf4 Updated mixer unittests and fixed a related bug in the new mixer.
Changes to the mixer unittests:

Removed the tests related to the former 'OutputMixer', as it's going
to be removed. Removed incorrect comparison tests with the old mixer
because doing identical mixing decisions with the old mixer proved
unviable.

When the new mixer went from kMaximumAmountOfMixedAudioSources in the
last iteration to kMaximumAmountOfMixedAudioSources+1, it could hit an
RTC_NOTREACHED(); Added fix to mixer and test
AudioMixer.RampedOutSourcesShouldNotBeMarkedMixed that covers that
case.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2253153004
Cr-Commit-Position: refs/heads/master@{#13880}
2016-08-24 08:38:50 +00:00
aleloi
616df1e95c Added a level indicator to new mixer.
Added a level indicator to the new mixer. The level indicator is
webrtc::voe::AudioLevel. It computes the current audio level, which is
used all the way up to peerconnection.

This is part of the project to rewrite the old conference mixer and
output mixer.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2230823004
Cr-Commit-Position: refs/heads/master@{#13878}
2016-08-24 08:17:20 +00:00
kwiberg
4ec01d9c9d Fix trivial lint errors in FileRecorder and FilePlayer
Mostly, it's about replacing mutable reference arguments with pointer
arguments, and replacing C style casts with C++ style casts.

Review-Url: https://codereview.webrtc.org/2056653002
Cr-Commit-Position: refs/heads/master@{#13849}
2016-08-22 15:43:58 +00:00
kwiberg
5a25d9504a FileRecorder + FilePlayer: Let Create functions return unique_ptr
Because passing ownership in raw pointers makes kittens cry.

This also means we can ditch the Destroy functions and the protected
destructors. (Well, almost. We need to keep the old CreateFilePlayer
and DestroyFilePlayer around for a little while longer because of an
external caller.)

Review-Url: https://codereview.webrtc.org/2049683003
Cr-Commit-Position: refs/heads/master@{#13797}
2016-08-17 14:31:18 +00:00
kwiberg
9d7eb13c40 Revert of Move FilePlayer and FileRecorder to Voice Engine (patchset #3 id:40001 of https://codereview.webrtc.org/2247033003/ )
Reason for revert:
Reverting, because it turns out that third-party code was using webrtc::FilePlayer. I'm not at all sure that this is something WebRTC ought to be exporting, but since we did export it, we have to live with it for now.

Original issue's description:
> Move FilePlayer and FileRecorder to Voice Engine
>
> Because Voice Engine was the only user.
>
> (This has been landed twice before, as
> https://codereview.webrtc.org/2037623002 and
> https://codereview.webrtc.org/2240163002. Third time's a charm!)
>
> NOPRESUBMIT=True
> TBR=kjellander@webrtc.org
>
> Committed: https://crrev.com/427ce3d86f6328dc994f84a15c28bb7bfbaa46ef
> Cr-Commit-Position: refs/heads/master@{#13777}

TBR=
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/2245413002
Cr-Commit-Position: refs/heads/master@{#13779}
2016-08-16 11:08:39 +00:00
kwiberg
427ce3d86f Move FilePlayer and FileRecorder to Voice Engine
Because Voice Engine was the only user.

(This has been landed twice before, as
https://codereview.webrtc.org/2037623002 and
https://codereview.webrtc.org/2240163002. Third time's a charm!)

NOPRESUBMIT=True
TBR=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2247033003
Cr-Commit-Position: refs/heads/master@{#13777}
2016-08-16 10:34:50 +00:00
aleloi
70f866c647 Added new mixer to |check_targets| in .gn and fixed include/depend errors.
Also fixed one small chromium-style error in the new mixer.

NOTRY=True

Committed: https://crrev.com/d700bef583d29ba2834ae57b3af7e8d3b8306cb9
Review-Url: https://codereview.webrtc.org/2234293002
Cr-Original-Commit-Position: refs/heads/master@{#13752}
Cr-Commit-Position: refs/heads/master@{#13772}
2016-08-16 09:15:55 +00:00
kwiberg
c8c71f484e Revert of Move FilePlayer and FileRecorder to Voice Engine (patchset #6 id:100001 of https://codereview.webrtc.org/2240163002/ )
Reason for revert:
Breaks downstream code, so revert again. Yay.

Original issue's description:
> Move FilePlayer and FileRecorder to Voice Engine
>
> Because Voice Engine was the only user.
>
> (This is a re-land of https://codereview.webrtc.org/2037623002, which
> had to be reverted.)
>
> NOPRESUBMIT=True
>
> Committed: https://crrev.com/dc65ea29b3270ad418050658ad962ddd33ee70c1
> Cr-Commit-Position: refs/heads/master@{#13757}

TBR=perkj@webrtc.org,kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/2245153002
Cr-Commit-Position: refs/heads/master@{#13758}
2016-08-15 18:43:56 +00:00
kwiberg
dc65ea29b3 Move FilePlayer and FileRecorder to Voice Engine
Because Voice Engine was the only user.

(This is a re-land of https://codereview.webrtc.org/2037623002, which
had to be reverted.)

NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2240163002
Cr-Commit-Position: refs/heads/master@{#13757}
2016-08-15 17:36:38 +00:00
olka
2ab1da7c37 Revert of Added new mixer to |check_targets| in .gn and fixed include/depend errors. (patchset #1 id:1 of https://codereview.webrtc.org/2234293002/ )
Reason for revert:
Breaks Chromium FYI builds, for example https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/9219/steps/compile/logs/stdio

Original issue's description:
> Added new mixer to |check_targets| in .gn and fixed include/depend errors.
>
> Also fixed one small chromium-style error in the new mixer.
>
> NOTRY=True
>
> Committed: https://crrev.com/d700bef583d29ba2834ae57b3af7e8d3b8306cb9
> Cr-Commit-Position: refs/heads/master@{#13752}

TBR=kjellander@webrtc.org,aleloi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/2241243002
Cr-Commit-Position: refs/heads/master@{#13753}
2016-08-15 14:36:22 +00:00
aleloi
d700bef583 Added new mixer to |check_targets| in .gn and fixed include/depend errors.
Also fixed one small chromium-style error in the new mixer.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2234293002
Cr-Commit-Position: refs/heads/master@{#13752}
2016-08-15 14:24:13 +00:00
aleloi
5bcc00e538 Changed folder structure in new mixer and fixed simple lint errors.
The folder structure is now as was agreed on in the 'Slim and Modular
WebRTC' effort.  Also added some dependencies that were previously in
another part of the tree.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2238803002
Cr-Commit-Position: refs/heads/master@{#13742}
2016-08-15 10:01:37 +00:00
aleloi
df9e4d9fce Added new mixer folder to CPPLINT_DIRS. Fixed one small issue.
NOTRY=True

Review-Url: https://codereview.webrtc.org/2228503003
Cr-Commit-Position: refs/heads/master@{#13677}
2016-08-08 17:26:17 +00:00
aleloi
6382a19dc4 Renamed old-style variables.
Review-Url: https://codereview.webrtc.org/2227633002
Cr-Commit-Position: refs/heads/master@{#13676}
2016-08-08 17:25:10 +00:00
aleloi
4496809b28 Changed mixing api and moved resampler.
Removed resampler from NewAudioConferenceMixer and AudioMixer (which started as a copy of former OutputMixer). This is part of the mixer rewrite project. In particular,
this is one of the steps required to have a single mixing component
instead of two doing the same thing.

The next planned change (which is not part of this CL) is to plug in the
new mixer (NewAudioConferenceMixer) into AudioState and AudioDeviceModule.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2221443002
Cr-Commit-Position: refs/heads/master@{#13674}
2016-08-08 17:19:03 +00:00
aleloi
f3882571b0 Rewrote UpdateToMix in the audio mixer.
The new version is much shorter than the old one, and hopefully easier
to read. This is part of the effort to rewrite the old mixer.

NOTRY=True

Review-Url: https://codereview.webrtc.org/2132563002
Cr-Commit-Position: refs/heads/master@{#13570}
2016-07-29 09:12:46 +00:00
terelius
ea4c141ffa Revert of Rewrote UpdateToMix in the audio mixer. (patchset #5 id:120001 of https://codereview.webrtc.org/2132563002/ )
Reason for revert:
Multiple definitions of  webrtc::MockMixerParticipant::MockMixerParticipant() during linking of modules_unittests. Please investigate and resubmit.

Original issue's description:
> Rewrote UpdateToMix in the audio mixer.
>
> The new version is much shorter than the old one, and hopefully easier
> to read. This is part of the effort to rewrite the old mixer.
>
> Committed: https://crrev.com/2942e240f4a985752714dac18c141064c97696d4
> Cr-Commit-Position: refs/heads/master@{#13568}

TBR=ossu@webrtc.org,ivoc@webrtc.org,aleloi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.webrtc.org/2195633002
Cr-Commit-Position: refs/heads/master@{#13569}
2016-07-29 08:36:23 +00:00
aleloi
2942e240f4 Rewrote UpdateToMix in the audio mixer.
The new version is much shorter than the old one, and hopefully easier
to read. This is part of the effort to rewrite the old mixer.

Review-Url: https://codereview.webrtc.org/2132563002
Cr-Commit-Position: refs/heads/master@{#13568}
2016-07-29 08:23:54 +00:00
aleloi
a0db81f83a Removed the memory pool from the mixer.
Memory frames are now expected to be owned by the mixing participants.

Review-Url: https://codereview.webrtc.org/2127763002
Cr-Commit-Position: refs/heads/master@{#13554}
2016-07-28 13:36:32 +00:00
aleloi
8b2233f5a6 Removed Module inheritance and unused methods and members TimeScheduler, Process() and TimeToNextProcess() from mixer.
Review-Url: https://codereview.webrtc.org/2109333006
Cr-Commit-Position: refs/heads/master@{#13552}
2016-07-28 13:24:23 +00:00
aleloi
09f45108c2 Removed callback in old AudioConferenceMixer.
OutputMixer and AudioConferenceMixer communicated via a callback. OutputMixer implemented an AudioMixerOutputReceiver interface, which defines the callback function NewMixedAudio. This has been removed and replaced by a simple function in the new mixer. The audio frame with mixed audio is now copied one time less. I have also removed one forward declaration.

Review-Url: https://codereview.webrtc.org/2111293003
Cr-Commit-Position: refs/heads/master@{#13550}
2016-07-28 10:52:23 +00:00