OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/audio/mac/audio_input_mac.h" | 5 #include "media/audio/mac/audio_input_mac.h" |
6 | 6 |
7 #include <CoreServices/CoreServices.h> | 7 #include <CoreServices/CoreServices.h> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 HandleError(err); | 106 HandleError(err); |
107 } | 107 } |
108 if (callback_) { | 108 if (callback_) { |
109 callback_->OnClose(this); | 109 callback_->OnClose(this); |
110 callback_ = NULL; | 110 callback_ = NULL; |
111 } | 111 } |
112 manager_->ReleaseInputStream(this); | 112 manager_->ReleaseInputStream(this); |
113 // CARE: This object may now be destroyed. | 113 // CARE: This object may now be destroyed. |
114 } | 114 } |
115 | 115 |
116 void PCMQueueInAudioInputStream::SetMicVolume(double volume) { | |
117 NOTREACHED(); | |
henrika (OOO until Aug 14)
2012/02/21 14:03:47
Add comment here perhaps? Or rather NOTREACHED() <
no longer working on chromium
2012/02/21 18:01:38
Done.
| |
118 } | |
119 | |
120 void PCMQueueInAudioInputStream::GetMicVolume(double* volume) { | |
121 NOTREACHED(); | |
122 } | |
123 | |
124 void PCMQueueInAudioInputStream::GetMaxMicVolume(double* volume) { | |
125 NOTREACHED(); | |
126 } | |
127 | |
116 void PCMQueueInAudioInputStream::HandleError(OSStatus err) { | 128 void PCMQueueInAudioInputStream::HandleError(OSStatus err) { |
117 if (callback_) | 129 if (callback_) |
118 callback_->OnError(this, static_cast<int>(err)); | 130 callback_->OnError(this, static_cast<int>(err)); |
119 NOTREACHED() << "error " << GetMacOSStatusErrorString(err) | 131 NOTREACHED() << "error " << GetMacOSStatusErrorString(err) |
120 << " (" << err << ")"; | 132 << " (" << err << ")"; |
121 } | 133 } |
122 | 134 |
123 bool PCMQueueInAudioInputStream::SetupBuffers() { | 135 bool PCMQueueInAudioInputStream::SetupBuffers() { |
124 DCHECK(buffer_size_bytes_); | 136 DCHECK(buffer_size_bytes_); |
125 for (int i = 0; i < kNumberBuffers; ++i) { | 137 for (int i = 0; i < kNumberBuffers; ++i) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
186 // TODO(joth): PCMQueueOutAudioOutputStream uses callback_ to provide an | 198 // TODO(joth): PCMQueueOutAudioOutputStream uses callback_ to provide an |
187 // extra guard for this situation, but it seems to introduce more | 199 // extra guard for this situation, but it seems to introduce more |
188 // complications than it solves (memory barrier issues accessing it from | 200 // complications than it solves (memory barrier issues accessing it from |
189 // multiple threads, looses the means to indicate OnClosed to client). | 201 // multiple threads, looses the means to indicate OnClosed to client). |
190 // Should determine if we need to do something equivalent here. | 202 // Should determine if we need to do something equivalent here. |
191 return; | 203 return; |
192 } | 204 } |
193 HandleError(err); | 205 HandleError(err); |
194 } | 206 } |
195 } | 207 } |
OLD | NEW |