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/win/wavein_input_win.h" | 5 #include "media/audio/win/wavein_input_win.h" |
6 | 6 |
7 #pragma comment(lib, "winmm.lib") | 7 #pragma comment(lib, "winmm.lib") |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "media/audio/audio_io.h" | 10 #include "media/audio/audio_io.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // TODO(henrika): Add AGC support when volume control has been added. | 219 // TODO(henrika): Add AGC support when volume control has been added. |
220 NOTIMPLEMENTED(); | 220 NOTIMPLEMENTED(); |
221 } | 221 } |
222 | 222 |
223 bool PCMWaveInAudioInputStream::GetAutomaticGainControl() { | 223 bool PCMWaveInAudioInputStream::GetAutomaticGainControl() { |
224 // TODO(henrika): Add AGC support when volume control has been added. | 224 // TODO(henrika): Add AGC support when volume control has been added. |
225 NOTIMPLEMENTED(); | 225 NOTIMPLEMENTED(); |
226 return false; | 226 return false; |
227 } | 227 } |
228 | 228 |
| 229 bool PCMWaveInAudioInputStream::IsMuted() { |
| 230 NOTIMPLEMENTED(); |
| 231 return false; |
| 232 } |
| 233 |
229 void PCMWaveInAudioInputStream::HandleError(MMRESULT error) { | 234 void PCMWaveInAudioInputStream::HandleError(MMRESULT error) { |
230 DLOG(WARNING) << "PCMWaveInAudio error " << error; | 235 DLOG(WARNING) << "PCMWaveInAudio error " << error; |
231 if (callback_) | 236 if (callback_) |
232 callback_->OnError(this); | 237 callback_->OnError(this); |
233 } | 238 } |
234 | 239 |
235 void PCMWaveInAudioInputStream::QueueNextPacket(WAVEHDR *buffer) { | 240 void PCMWaveInAudioInputStream::QueueNextPacket(WAVEHDR *buffer) { |
236 MMRESULT res = ::waveInAddBuffer(wavein_, buffer, sizeof(WAVEHDR)); | 241 MMRESULT res = ::waveInAddBuffer(wavein_, buffer, sizeof(WAVEHDR)); |
237 if (res != MMSYSERR_NOERROR) | 242 if (res != MMSYSERR_NOERROR) |
238 HandleError(res); | 243 HandleError(res); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 ::SetEvent(obj->stopped_event_.Get()); | 316 ::SetEvent(obj->stopped_event_.Get()); |
312 } | 317 } |
313 } else if (msg == WIM_CLOSE) { | 318 } else if (msg == WIM_CLOSE) { |
314 // Intentionaly no-op for now. | 319 // Intentionaly no-op for now. |
315 } else if (msg == WIM_OPEN) { | 320 } else if (msg == WIM_OPEN) { |
316 // Intentionaly no-op for now. | 321 // Intentionaly no-op for now. |
317 } | 322 } |
318 } | 323 } |
319 | 324 |
320 } // namespace media | 325 } // namespace media |
OLD | NEW |