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

Unified Diff: webrtc/modules/audio_mixer/source/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: Created 4 years, 6 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
Index: webrtc/modules/audio_mixer/source/audio_conference_mixer_impl.cc
diff --git a/webrtc/modules/audio_mixer/source/audio_conference_mixer_impl.cc b/webrtc/modules/audio_mixer/source/audio_conference_mixer_impl.cc
index 1e738c6ffcaca525b0eb2287366c660906b6e8fc..b20932c20cab1e144040c9bc10e5f8a01519214d 100644
--- a/webrtc/modules/audio_mixer/source/audio_conference_mixer_impl.cc
+++ b/webrtc/modules/audio_mixer/source/audio_conference_mixer_impl.cc
@@ -116,9 +116,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());
@@ -171,34 +169,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);
- _processCalls++;
-
- // Let the scheduler know that we are running one iteration.
- _timeScheduler.UpdateScheduler();
- }
AudioFrameList mixList;
AudioFrameList rampOutList;
@@ -220,7 +192,6 @@ void NewAudioConferenceMixerImpl::Mix(AudioFrame* audio_frame_for_mixing) {
}
if (lowFreq <= 0) {
CriticalSectionScoped cs(_crit.get());
- _processCalls--;
return;
} else {
switch (lowFreq) {
@@ -248,7 +219,6 @@ void NewAudioConferenceMixerImpl::Mix(AudioFrame* audio_frame_for_mixing) {
assert(false);
CriticalSectionScoped cs(_crit.get());
- _processCalls--;
return;
}
}
@@ -308,10 +278,6 @@ void NewAudioConferenceMixerImpl::Mix(AudioFrame* audio_frame_for_mixing) {
ClearAudioFrameList(&mixList);
ClearAudioFrameList(&rampOutList);
ClearAudioFrameList(&additionalFramesList);
- {
- CriticalSectionScoped cs(_crit.get());
- _processCalls--;
- }
return;
}

Powered by Google App Engine
This is Rietveld 408576698