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

Side by Side Diff: media/audio/audio_output_controller.cc

Issue 7253003: Change audio renderer to communicate with host using low latency codepath. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 5 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 | « media/audio/audio_output_controller.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) 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 "media/audio/audio_output_controller.h" 5 #include "media/audio/audio_output_controller.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 // Signal a pause in low-latency mode. 11 // Signal a pause in low-latency mode.
12 static const int kPauseMark = -1; 12 const int AudioOutputController::kPauseMark = -1;
13 13
14 AudioOutputController::AudioOutputController(EventHandler* handler, 14 AudioOutputController::AudioOutputController(EventHandler* handler,
15 uint32 capacity, 15 uint32 capacity,
16 SyncReader* sync_reader) 16 SyncReader* sync_reader)
17 : handler_(handler), 17 : handler_(handler),
18 stream_(NULL), 18 stream_(NULL),
19 volume_(1.0), 19 volume_(1.0),
20 state_(kEmpty), 20 state_(kEmpty),
21 buffer_(0, capacity), 21 buffer_(0, capacity),
22 pending_request_(false), 22 pending_request_(false),
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 buffers_state.pending_bytes += buffer_.forward_bytes(); 313 buffers_state.pending_bytes += buffer_.forward_bytes();
314 314
315 // If we need more data then call the event handler to ask for more data. 315 // If we need more data then call the event handler to ask for more data.
316 // It is okay that we don't lock in this block because the parameters are 316 // It is okay that we don't lock in this block because the parameters are
317 // correct and in the worst case we are just asking more data than needed. 317 // correct and in the worst case we are just asking more data than needed.
318 base::AutoUnlock auto_unlock(lock_); 318 base::AutoUnlock auto_unlock(lock_);
319 handler_->OnMoreData(this, buffers_state); 319 handler_->OnMoreData(this, buffers_state);
320 } 320 }
321 321
322 } // namespace media 322 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_output_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698