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..ca8bdbeaed5ffe056a8d2eecd84ab37867edda8a 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_; |
- std::unique_ptr<CriticalSectionWrapper> cb_crit_; |
int32_t id_; |
@@ -141,12 +142,12 @@ class AudioMixerImpl : public AudioMixer { |
size_t sample_size_; |
// List of all audio sources. Note all lists are disjunct |
- MixerAudioSourceList audio_source_list_; // May be mixed. |
+ MixerAudioSourceList audio_source_list_ GUARDED_BY(crit_); // May be mixed. |
// Always mixed, anonomously. |
- MixerAudioSourceList additional_audio_source_list_; |
+ MixerAudioSourceList additional_audio_source_list_ GUARDED_BY(crit_); |
- size_t num_mixed_audio_sources_; |
+ size_t num_mixed_audio_sources_ GUARDED_BY(crit_); |
kwiberg-webrtc
2016/09/01 11:19:00
Good, but it makes me very suspicious that this cl
aleloi
2016/09/01 11:24:39
The other ones are only accessed by the mixer func
kwiberg-webrtc
2016/09/01 11:32:28
Could you annotate them with the thread checker st
aleloi
2016/09/01 12:33:06
Good point! I've followed the example usage instru
kwiberg-webrtc
2016/09/02 07:45:45
Excellent! Did you verify that you got the expecte
|
// Determines if we will use a limiter for clipping protection during |
// mixing. |
bool use_limiter_; |