Chromium Code Reviews| 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 1abc679480e69d35920d39eb1bb68693c622e1ac..b44fddb1dc74289b5f71749004d19e45d2e31977 100644 |
| --- a/webrtc/modules/audio_mixer/audio_mixer_impl.h |
| +++ b/webrtc/modules/audio_mixer/audio_mixer_impl.h |
| @@ -17,7 +17,7 @@ |
| #include "webrtc/api/audio/audio_mixer.h" |
| #include "webrtc/base/scoped_ref_ptr.h" |
| #include "webrtc/base/thread_annotations.h" |
| -#include "webrtc/base/thread_checker.h" |
| +#include "webrtc/base/race_checker.h" |
| #include "webrtc/modules/audio_processing/include/audio_processing.h" |
| #include "webrtc/modules/include/module_common_types.h" |
| #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
| @@ -90,23 +90,23 @@ class AudioMixerImpl : public AudioMixer { |
| rtc::CriticalSection crit_; |
| // The current sample frequency and sample size when mixing. |
| - int output_frequency_ ACCESS_ON(&thread_checker_); |
| - size_t sample_size_ ACCESS_ON(&thread_checker_); |
| + int output_frequency_ GUARDED_BY(&race_checker_); |
|
kwiberg-webrtc
2016/10/20 09:37:14
Is the & necessary?
aleloi
2016/10/20 09:52:01
Turns out it isn't. I've removed it.
I looked in
kwiberg-webrtc
2016/10/20 10:47:13
👍
|
| + size_t sample_size_ GUARDED_BY(&race_checker_); |
| // List of all audio sources. Note all lists are disjunct |
| SourceStatusList audio_source_list_ GUARDED_BY(crit_); // May be mixed. |
| // Determines if we will use a limiter for clipping protection during |
| // mixing. |
| - bool use_limiter_ ACCESS_ON(&thread_checker_); |
| + bool use_limiter_ GUARDED_BY(&race_checker_); |
| - uint32_t time_stamp_ ACCESS_ON(&thread_checker_); |
| + uint32_t time_stamp_ GUARDED_BY(&race_checker_); |
| - // Ensures that Mix is called from the same thread. |
| - rtc::ThreadChecker thread_checker_; |
| + // Checks that Mix is called sequentially. |
|
aleloi
2016/10/20 09:24:23
We cannot *ensure* at compile time, because (if I
|
| + rtc::RaceChecker race_checker_; |
|
kwiberg-webrtc
2016/10/20 09:37:14
I would move this up to where crit_ is defined, an
aleloi
2016/10/20 09:52:01
Moved up and reworded comment.
kwiberg-webrtc
2016/10/20 10:47:13
Excellent.
|
| // Used for inhibiting saturation in mixing. |
| - std::unique_ptr<AudioProcessing> limiter_ ACCESS_ON(&thread_checker_); |
| + std::unique_ptr<AudioProcessing> limiter_ GUARDED_BY(&race_checker_); |
| RTC_DISALLOW_COPY_AND_ASSIGN(AudioMixerImpl); |
| }; |