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

Unified Diff: webrtc/modules/audio_mixer/audio_mixer_impl.h

Issue 2286343002: Less lock acquisitions for AudioMixer. (Closed)
Patch Set: Changes in response to reviewer comments. Created 4 years, 4 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/audio_mixer_impl.h
diff --git a/webrtc/modules/audio_mixer/audio_mixer_impl.h b/webrtc/modules/audio_mixer/audio_mixer_impl.h
index 6ddf9ca5e8bde5c6954d458a6cfcdba8a902f9e7..6f612ca9abea0ca713efefd23611965ed0080d27 100644
--- a/webrtc/modules/audio_mixer/audio_mixer_impl.h
+++ b/webrtc/modules/audio_mixer/audio_mixer_impl.h
@@ -89,7 +89,8 @@ class AudioMixerImpl : public AudioMixer {
// Compute what audio sources to mix from audio_source_list_. Ramp in
// and out. Update mixed status. maxAudioFrameCounter specifies how
// many participants are allowed to be mixed.
- AudioFrameList UpdateToMix(size_t maxAudioFrameCounter) const;
+ AudioFrameList UpdateToMix(size_t maxAudioFrameCounter) const
+ EXCLUSIVE_LOCKS_REQUIRED(crit_);
// Return the lowest mixing frequency that can be used without having to
// downsample any audio.
@@ -98,7 +99,8 @@ class AudioMixerImpl : public AudioMixer {
const MixerAudioSourceList& mixList) const;
// Return the AudioFrames that should be mixed anonymously.
- void GetAdditionalAudio(AudioFrameList* additionalFramesList) const;
+ void GetAdditionalAudio(AudioFrameList* additionalFramesList) const
+ EXCLUSIVE_LOCKS_REQUIRED(crit_);
// This function returns true if it finds the MixerAudioSource in the
// specified list of MixerAudioSources.
@@ -132,7 +134,6 @@ class AudioMixerImpl : public AudioMixer {
int GetOutputAudioLevelFullRange() override;
std::unique_ptr<CriticalSectionWrapper> crit_;
ivoc 2016/08/31 14:34:24 Please also add GUARDED_BY(crit_) to any members t
aleloi 2016/08/31 15:16:21 Done
- std::unique_ptr<CriticalSectionWrapper> cb_crit_;
int32_t id_;
« no previous file with comments | « no previous file | webrtc/modules/audio_mixer/audio_mixer_impl.cc » ('j') | webrtc/modules/audio_mixer/test/audio_mixer_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698