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

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

Issue 1809343002: Refactor AudioUnit code into its own class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: CR comments Created 4 years, 9 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 name:AVAudioSessionMediaServicesWereResetNotification 68 name:AVAudioSessionMediaServicesWereResetNotification
69 object:nil]; 69 object:nil];
70 } 70 }
71 return self; 71 return self;
72 } 72 }
73 73
74 - (void)dealloc { 74 - (void)dealloc {
75 [[NSNotificationCenter defaultCenter] removeObserver:self]; 75 [[NSNotificationCenter defaultCenter] removeObserver:self];
76 } 76 }
77 77
78 - (NSString *)description {
79 NSString *format =
80 @"RTCAudioSession: {\n"
81 " isActive: %d\n"
82 " sampleRate: %.2f\n"
83 " IOBufferDuration: %f\n"
84 " outputNumberOfChannels: %ld\n"
85 " inputNumberOfChannels: %ld\n"
86 " outputLatency: %f\n"
87 " inputLatency: %f\n"
88 "}";
89 NSString *description = [NSString stringWithFormat:format,
90 self.isActive, self.sampleRate, self.IOBufferDuration,
91 self.outputNumberOfChannels, self.inputNumberOfChannels,
92 self.outputLatency, self.inputLatency];
93 return description;
94 }
95
78 - (void)setIsActive:(BOOL)isActive { 96 - (void)setIsActive:(BOOL)isActive {
79 @synchronized(self) { 97 @synchronized(self) {
80 _isActive = isActive; 98 _isActive = isActive;
81 } 99 }
82 } 100 }
83 101
84 - (BOOL)isActive { 102 - (BOOL)isActive {
85 @synchronized(self) { 103 @synchronized(self) {
86 return _isActive; 104 return _isActive;
87 } 105 }
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 } 589 }
572 } 590 }
573 591
574 - (void)notifyMediaServicesWereReset { 592 - (void)notifyMediaServicesWereReset {
575 for (auto delegate : self.delegates) { 593 for (auto delegate : self.delegates) {
576 [delegate audioSessionMediaServicesWereReset:self]; 594 [delegate audioSessionMediaServicesWereReset:self];
577 } 595 }
578 } 596 }
579 597
580 @end 598 @end
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/ios/audio_device_ios.mm ('k') | webrtc/modules/audio_device/ios/voice_processing_audio_unit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698