Chromium Code Reviews| Index: webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc |
| diff --git a/webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc b/webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc |
| index e71f9f0c3582e072445130201bbd5d2e41dfd93e..c08d7c532ced4554c38e3f93142e539173da0395 100644 |
| --- a/webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc |
| +++ b/webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc |
| @@ -115,9 +115,7 @@ NewAudioConferenceMixerImpl::NewAudioConferenceMixerImpl(int id) |
| _additionalParticipantList(), |
| _numMixedParticipants(0), |
| use_limiter_(true), |
| - _timeStamp(0), |
| - _timeScheduler(kProcessPeriodicityInMs), |
| - _processCalls(0) {} |
| + _timeStamp(0) {} |
| bool NewAudioConferenceMixerImpl::Init() { |
| _crit.reset(CriticalSectionWrapper::CreateCriticalSection()); |
| @@ -170,34 +168,8 @@ NewAudioConferenceMixerImpl::~NewAudioConferenceMixerImpl() { |
| assert(_audioFramePool == NULL); |
| } |
| -// Process should be called every kProcessPeriodicityInMs ms |
| -int64_t NewAudioConferenceMixerImpl::TimeUntilNextProcess() { |
| - int64_t timeUntilNextProcess = 0; |
| - CriticalSectionScoped cs(_crit.get()); |
| - if (_timeScheduler.TimeToNextUpdate(timeUntilNextProcess) != 0) { |
| - WEBRTC_TRACE(kTraceError, kTraceAudioMixerServer, _id, |
| - "failed in TimeToNextUpdate() call"); |
| - // Sanity check |
| - assert(false); |
| - return -1; |
| - } |
| - return timeUntilNextProcess; |
| -} |
| - |
| -void NewAudioConferenceMixerImpl::Process() { |
| - RTC_NOTREACHED(); |
| -} |
| - |
| void NewAudioConferenceMixerImpl::Mix(AudioFrame* audio_frame_for_mixing) { |
| size_t remainingParticipantsAllowedToMix = kMaximumAmountOfMixedParticipants; |
| - { |
| - CriticalSectionScoped cs(_crit.get()); |
| - assert(_processCalls == 0); |
|
ivoc
2016/07/04 13:11:52
It seems like this code checks that this function
aleloi
2016/07/06 10:20:32
Wow! This was important and I missed it. I thought
ivoc
2016/07/06 14:43:26
Although I agree that it's good to check for this,
aleloi
2016/07/06 15:17:19
Good idea! Done.
|
| - _processCalls++; |
| - |
| - // Let the scheduler know that we are running one iteration. |
| - _timeScheduler.UpdateScheduler(); |
| - } |
| AudioFrameList mixList; |
| AudioFrameList rampOutList; |
| @@ -219,7 +191,6 @@ void NewAudioConferenceMixerImpl::Mix(AudioFrame* audio_frame_for_mixing) { |
| } |
| if (lowFreq <= 0) { |
| CriticalSectionScoped cs(_crit.get()); |
| - _processCalls--; |
| return; |
| } else { |
| switch (lowFreq) { |
| @@ -247,7 +218,6 @@ void NewAudioConferenceMixerImpl::Mix(AudioFrame* audio_frame_for_mixing) { |
| assert(false); |
| CriticalSectionScoped cs(_crit.get()); |
| - _processCalls--; |
| return; |
| } |
| } |
| @@ -299,10 +269,6 @@ void NewAudioConferenceMixerImpl::Mix(AudioFrame* audio_frame_for_mixing) { |
| ClearAudioFrameList(&mixList); |
| ClearAudioFrameList(&rampOutList); |
| ClearAudioFrameList(&additionalFramesList); |
| - { |
| - CriticalSectionScoped cs(_crit.get()); |
| - _processCalls--; |
| - } |
| return; |
| } |