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

Side by Side Diff: content/renderer/media/webrtc_audio_device_impl.cc

Issue 9234066: Detect errors in audio output and report them upstream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/renderer/media/webrtc_audio_device_impl.h" 5 #include "content/renderer/media/webrtc_audio_device_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "content/renderer/media/audio_hardware.h" 10 #include "content/renderer/media/audio_hardware.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 output_buffer_.get(), 111 output_buffer_.get(),
112 audio_data[channel_index], 112 audio_data[channel_index],
113 channels, 113 channels,
114 channel_index, 114 channel_index,
115 bytes_per_sample_, 115 bytes_per_sample_,
116 number_of_frames); 116 number_of_frames);
117 } 117 }
118 return number_of_frames; 118 return number_of_frames;
119 } 119 }
120 120
121 void WebRtcAudioDeviceImpl::OnError() {
122 // TODO(henrika): Implement error handling.
123 }
124
121 void WebRtcAudioDeviceImpl::Capture( 125 void WebRtcAudioDeviceImpl::Capture(
122 const std::vector<float*>& audio_data, 126 const std::vector<float*>& audio_data,
123 size_t number_of_frames, 127 size_t number_of_frames,
124 size_t audio_delay_milliseconds) { 128 size_t audio_delay_milliseconds) {
125 DCHECK_LE(number_of_frames, input_buffer_size_); 129 DCHECK_LE(number_of_frames, input_buffer_size_);
126 130
127 int output_delay_ms = 0; 131 int output_delay_ms = 0;
128 { 132 {
129 base::AutoLock auto_lock(lock_); 133 base::AutoLock auto_lock(lock_);
130 // Store the reported audio delay locally. 134 // Store the reported audio delay locally.
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 } 982 }
979 983
980 int32_t WebRtcAudioDeviceImpl::GetLoudspeakerStatus(bool* enabled) const { 984 int32_t WebRtcAudioDeviceImpl::GetLoudspeakerStatus(bool* enabled) const {
981 NOTIMPLEMENTED(); 985 NOTIMPLEMENTED();
982 return -1; 986 return -1;
983 } 987 }
984 988
985 void WebRtcAudioDeviceImpl::SetSessionId(int session_id) { 989 void WebRtcAudioDeviceImpl::SetSessionId(int session_id) {
986 session_id_ = session_id; 990 session_id_ = session_id;
987 } 991 }
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_device_impl.h ('k') | content/renderer/renderer_webaudiodevice_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698