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

Side by Side Diff: media/audio/win/wavein_input_win.cc

Issue 645923002: Add support for audio input mute detection on all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 2 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 | « media/audio/win/wavein_input_win.h ('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 // 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
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
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
OLDNEW
« no previous file with comments | « media/audio/win/wavein_input_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698