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

Side by Side Diff: content/renderer/media/audio_device.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, 11 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
« no previous file with comments | « no previous file | content/renderer/media/audio_renderer_impl.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 (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 "content/renderer/media/audio_device.h" 5 #include "content/renderer/media/audio_device.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 Send(new AudioHostMsg_SetVolume(stream_id_, volume)); 197 Send(new AudioHostMsg_SetVolume(stream_id_, volume));
198 } 198 }
199 199
200 void AudioDevice::OnRequestPacket(AudioBuffersState buffers_state) { 200 void AudioDevice::OnRequestPacket(AudioBuffersState buffers_state) {
201 // This method does not apply to the low-latency system. 201 // This method does not apply to the low-latency system.
202 } 202 }
203 203
204 void AudioDevice::OnStateChanged(AudioStreamState state) { 204 void AudioDevice::OnStateChanged(AudioStreamState state) {
205 if (state == kAudioStreamError) { 205 if (state == kAudioStreamError) {
206 DLOG(WARNING) << "AudioDevice::OnStateChanged(kError)"; 206 DLOG(WARNING) << "AudioDevice::OnStateChanged(kError)";
207 callback_->OnError();
207 } 208 }
208 } 209 }
209 210
210 void AudioDevice::OnCreated( 211 void AudioDevice::OnCreated(
211 base::SharedMemoryHandle handle, uint32 length) { 212 base::SharedMemoryHandle handle, uint32 length) {
212 // Not needed in this simple implementation. 213 // Not needed in this simple implementation.
213 } 214 }
214 215
215 void AudioDevice::OnLowLatencyCreated( 216 void AudioDevice::OnLowLatencyCreated(
216 base::SharedMemoryHandle handle, 217 base::SharedMemoryHandle handle,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 320
320 if (audio_thread_.get()) { 321 if (audio_thread_.get()) {
321 // Close the socket to terminate the main thread function in the 322 // Close the socket to terminate the main thread function in the
322 // audio thread. 323 // audio thread.
323 audio_socket_->Close(); 324 audio_socket_->Close();
324 audio_socket_ = NULL; 325 audio_socket_ = NULL;
325 audio_thread_->Join(); 326 audio_thread_->Join();
326 audio_thread_.reset(NULL); 327 audio_thread_.reset(NULL);
327 } 328 }
328 } 329 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/audio_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698