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

Side by Side Diff: webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm

Issue 2790883002: remove module-wide warning suppression. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « webrtc/modules/audio_device/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 @synchronized(self) { 187 @synchronized(self) {
188 _delegates.erase(std::remove(_delegates.begin(), 188 _delegates.erase(std::remove(_delegates.begin(),
189 _delegates.end(), 189 _delegates.end(),
190 delegate), 190 delegate),
191 _delegates.end()); 191 _delegates.end());
192 [self removeZeroedDelegates]; 192 [self removeZeroedDelegates];
193 } 193 }
194 } 194 }
195 195
196 #pragma clang diagnostic push
197 #pragma clang diagnostic ignored "-Wthread-safety-analysis"
198
196 - (void)lockForConfiguration { 199 - (void)lockForConfiguration {
197 _crit.Enter(); 200 _crit.Enter();
198 rtc::AtomicOps::Increment(&_lockRecursionCount); 201 rtc::AtomicOps::Increment(&_lockRecursionCount);
199 } 202 }
200 203
201 - (void)unlockForConfiguration { 204 - (void)unlockForConfiguration {
202 // Don't let threads other than the one that called lockForConfiguration 205 // Don't let threads other than the one that called lockForConfiguration
203 // unlock. 206 // unlock.
204 if (_crit.TryEnter()) { 207 if (_crit.TryEnter()) {
205 rtc::AtomicOps::Decrement(&_lockRecursionCount); 208 rtc::AtomicOps::Decrement(&_lockRecursionCount);
206 // One unlock for the tryLock, and another one to actually unlock. If this 209 // One unlock for the tryLock, and another one to actually unlock. If this
207 // was called without anyone calling lock, we will hit an assertion. 210 // was called without anyone calling lock, we will hit an assertion.
208 _crit.Leave(); 211 _crit.Leave();
209 _crit.Leave(); 212 _crit.Leave();
210 } 213 }
211 } 214 }
212 215
216 #pragma clang diagnostic pop
217
213 #pragma mark - AVAudioSession proxy methods 218 #pragma mark - AVAudioSession proxy methods
214 219
215 - (NSString *)category { 220 - (NSString *)category {
216 return self.session.category; 221 return self.session.category;
217 } 222 }
218 223
219 - (AVAudioSessionCategoryOptions)categoryOptions { 224 - (AVAudioSessionCategoryOptions)categoryOptions {
220 return self.session.categoryOptions; 225 return self.session.categoryOptions;
221 } 226 }
222 227
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 - (void)notifyDidStopPlayOrRecord { 858 - (void)notifyDidStopPlayOrRecord {
854 for (auto delegate : self.delegates) { 859 for (auto delegate : self.delegates) {
855 SEL sel = @selector(audioSessionDidStopPlayOrRecord:); 860 SEL sel = @selector(audioSessionDidStopPlayOrRecord:);
856 if ([delegate respondsToSelector:sel]) { 861 if ([delegate respondsToSelector:sel]) {
857 [delegate audioSessionDidStopPlayOrRecord:self]; 862 [delegate audioSessionDidStopPlayOrRecord:self];
858 } 863 }
859 } 864 }
860 } 865 }
861 866
862 @end 867 @end
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698