OLD | NEW |
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/filters/audio_renderer_impl.h" | 5 #include "media/filters/audio_renderer_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 base::AutoLock auto_lock(lock_); | 146 base::AutoLock auto_lock(lock_); |
147 DCHECK(!rendering_); | 147 DCHECK(!rendering_); |
148 DCHECK_EQ(state_, kFlushed); | 148 DCHECK_EQ(state_, kFlushed); |
149 | 149 |
150 start_timestamp_ = time; | 150 start_timestamp_ = time; |
151 audio_clock_.reset(new AudioClock(time, audio_parameters_.sample_rate())); | 151 audio_clock_.reset(new AudioClock(time, audio_parameters_.sample_rate())); |
152 } | 152 } |
153 | 153 |
154 base::TimeDelta AudioRendererImpl::CurrentMediaTime() { | 154 base::TimeDelta AudioRendererImpl::CurrentMediaTime() { |
155 DVLOG(1) << __FUNCTION__; | 155 DVLOG(2) << __FUNCTION__; |
156 DCHECK(task_runner_->BelongsToCurrentThread()); | 156 DCHECK(task_runner_->BelongsToCurrentThread()); |
157 | 157 |
158 // TODO(scherkus): Finish implementing when ready to switch Pipeline to using | 158 // TODO(scherkus): Finish implementing when ready to switch Pipeline to using |
159 // TimeSource http://crbug.com/370634 | 159 // TimeSource http://crbug.com/370634 |
160 NOTIMPLEMENTED(); | 160 NOTIMPLEMENTED(); |
161 | 161 |
162 return base::TimeDelta(); | 162 return base::TimeDelta(); |
163 } | 163 } |
164 | 164 |
165 TimeSource* AudioRendererImpl::GetTimeSource() { | 165 TimeSource* AudioRendererImpl::GetTimeSource() { |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 << buffering_state; | 699 << buffering_state; |
700 DCHECK_NE(buffering_state_, buffering_state); | 700 DCHECK_NE(buffering_state_, buffering_state); |
701 lock_.AssertAcquired(); | 701 lock_.AssertAcquired(); |
702 buffering_state_ = buffering_state; | 702 buffering_state_ = buffering_state; |
703 | 703 |
704 task_runner_->PostTask(FROM_HERE, | 704 task_runner_->PostTask(FROM_HERE, |
705 base::Bind(buffering_state_cb_, buffering_state_)); | 705 base::Bind(buffering_state_cb_, buffering_state_)); |
706 } | 706 } |
707 | 707 |
708 } // namespace media | 708 } // namespace media |
OLD | NEW |