OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |