Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.cc

Issue 2109333006: Removed TimeScheduler, Process() and TimeToNextProcess() from mixer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@remove_callback
Patch Set: Upstream: renamed files, add gyp. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « webrtc/modules/audio_mixer/source/new_audio_conference_mixer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698