| Index: webrtc/modules/audio_device/ios/audio_device_ios.mm
 | 
| diff --git a/webrtc/modules/audio_device/ios/audio_device_ios.mm b/webrtc/modules/audio_device/ios/audio_device_ios.mm
 | 
| index 95834d25311e39eb251ba1bf29fbfcca01723ea9..b0d26be6ec28837a4cebd6e66ffd869e2af2d0e5 100644
 | 
| --- a/webrtc/modules/audio_device/ios/audio_device_ios.mm
 | 
| +++ b/webrtc/modules/audio_device/ios/audio_device_ios.mm
 | 
| @@ -28,7 +28,7 @@
 | 
|  namespace webrtc {
 | 
|  
 | 
|  // Protects |g_audio_session_users|.
 | 
| -static rtc::GlobalLockPod g_lock = {{0}};
 | 
| +static rtc::GlobalLockPod g_lock;
 | 
|  
 | 
|  // Counts number of users (=instances of this object) who needs an active
 | 
|  // audio session. This variable is used to ensure that we only activate an audio
 | 
| @@ -288,8 +288,8 @@
 | 
|  AudioDeviceIOS::AudioDeviceIOS()
 | 
|      : audio_device_buffer_(nullptr),
 | 
|        vpio_unit_(nullptr),
 | 
| -      recording_({0}),
 | 
| -      playing_({0}),
 | 
| +      recording_(0),
 | 
| +      playing_(0),
 | 
|        initialized_(false),
 | 
|        rec_is_initialized_(false),
 | 
|        play_is_initialized_(false),
 | 
| @@ -359,7 +359,7 @@
 | 
|    RTC_DCHECK(thread_checker_.CalledOnValidThread());
 | 
|    RTC_DCHECK(initialized_);
 | 
|    RTC_DCHECK(!play_is_initialized_);
 | 
| -  RTC_DCHECK(!Playing());
 | 
| +  RTC_DCHECK(!playing_);
 | 
|    if (!rec_is_initialized_) {
 | 
|      if (!InitPlayOrRecord()) {
 | 
|        LOG_F(LS_ERROR) << "InitPlayOrRecord failed for InitPlayout!";
 | 
| @@ -375,7 +375,7 @@
 | 
|    RTC_DCHECK(thread_checker_.CalledOnValidThread());
 | 
|    RTC_DCHECK(initialized_);
 | 
|    RTC_DCHECK(!rec_is_initialized_);
 | 
| -  RTC_DCHECK(!Recording());
 | 
| +  RTC_DCHECK(!recording_);
 | 
|    if (!play_is_initialized_) {
 | 
|      if (!InitPlayOrRecord()) {
 | 
|        LOG_F(LS_ERROR) << "InitPlayOrRecord failed for InitRecording!";
 | 
| @@ -390,9 +390,9 @@
 | 
|    LOGI() << "StartPlayout";
 | 
|    RTC_DCHECK(thread_checker_.CalledOnValidThread());
 | 
|    RTC_DCHECK(play_is_initialized_);
 | 
| -  RTC_DCHECK(!Playing());
 | 
| +  RTC_DCHECK(!playing_);
 | 
|    fine_audio_buffer_->ResetPlayout();
 | 
| -  if (!Recording()) {
 | 
| +  if (!recording_) {
 | 
|      OSStatus result = AudioOutputUnitStart(vpio_unit_);
 | 
|      if (result != noErr) {
 | 
|        LOG_F(LS_ERROR) << "AudioOutputUnitStart failed for StartPlayout: "
 | 
| @@ -401,21 +401,21 @@
 | 
|      }
 | 
|      LOG(LS_INFO) << "Voice-Processing I/O audio unit is now started";
 | 
|    }
 | 
| -  rtc::AtomicInt::ReleaseStore(&playing_, 1);
 | 
| +  rtc::AtomicOps::ReleaseStore(&playing_, 1);
 | 
|    return 0;
 | 
|  }
 | 
|  
 | 
|  int32_t AudioDeviceIOS::StopPlayout() {
 | 
|    LOGI() << "StopPlayout";
 | 
|    RTC_DCHECK(thread_checker_.CalledOnValidThread());
 | 
| -  if (!play_is_initialized_ || !Playing()) {
 | 
| +  if (!play_is_initialized_ || !playing_) {
 | 
|      return 0;
 | 
|    }
 | 
| -  if (!Recording()) {
 | 
| +  if (!recording_) {
 | 
|      ShutdownPlayOrRecord();
 | 
|    }
 | 
|    play_is_initialized_ = false;
 | 
| -  rtc::AtomicInt::ReleaseStore(&playing_, 0);
 | 
| +  rtc::AtomicOps::ReleaseStore(&playing_, 0);
 | 
|    return 0;
 | 
|  }
 | 
|  
 | 
| @@ -423,9 +423,9 @@
 | 
|    LOGI() << "StartRecording";
 | 
|    RTC_DCHECK(thread_checker_.CalledOnValidThread());
 | 
|    RTC_DCHECK(rec_is_initialized_);
 | 
| -  RTC_DCHECK(!Recording());
 | 
| +  RTC_DCHECK(!recording_);
 | 
|    fine_audio_buffer_->ResetRecord();
 | 
| -  if (!Playing()) {
 | 
| +  if (!playing_) {
 | 
|      OSStatus result = AudioOutputUnitStart(vpio_unit_);
 | 
|      if (result != noErr) {
 | 
|        LOG_F(LS_ERROR) << "AudioOutputUnitStart failed for StartRecording: "
 | 
| @@ -434,21 +434,21 @@
 | 
|      }
 | 
|      LOG(LS_INFO) << "Voice-Processing I/O audio unit is now started";
 | 
|    }
 | 
| -  rtc::AtomicInt::ReleaseStore(&recording_, 1);
 | 
| +  rtc::AtomicOps::ReleaseStore(&recording_, 1);
 | 
|    return 0;
 | 
|  }
 | 
|  
 | 
|  int32_t AudioDeviceIOS::StopRecording() {
 | 
|    LOGI() << "StopRecording";
 | 
|    RTC_DCHECK(thread_checker_.CalledOnValidThread());
 | 
| -  if (!rec_is_initialized_ || !Recording()) {
 | 
| +  if (!rec_is_initialized_ || !recording_) {
 | 
|      return 0;
 | 
|    }
 | 
| -  if (!Playing()) {
 | 
| +  if (!playing_) {
 | 
|      ShutdownPlayOrRecord();
 | 
|    }
 | 
|    rec_is_initialized_ = false;
 | 
| -  rtc::AtomicInt::ReleaseStore(&recording_, 0);
 | 
| +  rtc::AtomicOps::ReleaseStore(&recording_, 0);
 | 
|    return 0;
 | 
|  }
 | 
|  
 | 
| @@ -1028,7 +1028,7 @@
 | 
|      UInt32 in_number_frames) {
 | 
|    OSStatus result = noErr;
 | 
|    // Simply return if recording is not enabled.
 | 
| -  if (!Recording())
 | 
| +  if (!rtc::AtomicOps::AcquireLoad(&recording_))
 | 
|      return result;
 | 
|    if (in_number_frames != record_parameters_.frames_per_buffer()) {
 | 
|      // We have seen short bursts (1-2 frames) where |in_number_frames| changes.
 | 
| @@ -1087,7 +1087,7 @@
 | 
|    SInt8* destination = static_cast<SInt8*>(io_data->mBuffers[0].mData);
 | 
|    // Produce silence and give audio unit a hint about it if playout is not
 | 
|    // activated.
 | 
| -  if (!Playing()) {
 | 
| +  if (!rtc::AtomicOps::AcquireLoad(&playing_)) {
 | 
|      *io_action_flags |= kAudioUnitRenderAction_OutputIsSilence;
 | 
|      memset(destination, 0, dataSizeInBytes);
 | 
|      return noErr;
 | 
| 
 |