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

Side by Side Diff: media/audio/alsa/alsa_input.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/alsa/alsa_input.h ('k') | media/audio/android/audio_record_input.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/alsa/alsa_input.h" 5 #include "media/audio/alsa/alsa_input.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 mixer_element_handle_, static_cast<snd_mixer_selem_channel_id_t>(0), 329 mixer_element_handle_, static_cast<snd_mixer_selem_channel_id_t>(0),
330 &current_volume); 330 &current_volume);
331 if (error < 0) { 331 if (error < 0) {
332 DLOG(WARNING) << "Unable to get volume for " << device_name_; 332 DLOG(WARNING) << "Unable to get volume for " << device_name_;
333 return 0.0; 333 return 0.0;
334 } 334 }
335 335
336 return static_cast<double>(current_volume); 336 return static_cast<double>(current_volume);
337 } 337 }
338 338
339 bool AlsaPcmInputStream::IsMuted() {
340 return false;
341 }
342
339 void AlsaPcmInputStream::HandleError(const char* method, int error) { 343 void AlsaPcmInputStream::HandleError(const char* method, int error) {
340 LOG(WARNING) << method << ": " << wrapper_->StrError(error); 344 LOG(WARNING) << method << ": " << wrapper_->StrError(error);
341 callback_->OnError(this); 345 callback_->OnError(this);
342 } 346 }
343 347
344 } // namespace media 348 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/alsa/alsa_input.h ('k') | media/audio/android/audio_record_input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698