| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_stream_sink.h" | 5 #include "media/audio/audio_output_stream_sink.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 audio_task_runner_->PostTask( | 68 audio_task_runner_->PostTask( |
| 69 FROM_HERE, base::Bind(&AudioOutputStreamSink::DoPlay, this)); | 69 FROM_HERE, base::Bind(&AudioOutputStreamSink::DoPlay, this)); |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool AudioOutputStreamSink::SetVolume(double volume) { | 72 bool AudioOutputStreamSink::SetVolume(double volume) { |
| 73 audio_task_runner_->PostTask( | 73 audio_task_runner_->PostTask( |
| 74 FROM_HERE, base::Bind(&AudioOutputStreamSink::DoSetVolume, this, volume)); | 74 FROM_HERE, base::Bind(&AudioOutputStreamSink::DoSetVolume, this, volume)); |
| 75 return true; | 75 return true; |
| 76 } | 76 } |
| 77 | 77 |
| 78 OutputDeviceInfo AudioOutputStreamSink::GetOutputDeviceInfo() { | 78 OutputDeviceInfo AudioOutputStreamSink::GetOutputDeviceInfo( |
| 79 const AudioParameters& preferred_params) { |
| 79 return OutputDeviceInfo(); | 80 return OutputDeviceInfo(); |
| 80 } | 81 } |
| 81 | 82 |
| 82 bool AudioOutputStreamSink::CurrentThreadIsRenderingThread() { | 83 bool AudioOutputStreamSink::CurrentThreadIsRenderingThread() { |
| 83 NOTIMPLEMENTED(); | 84 NOTIMPLEMENTED(); |
| 84 return false; | 85 return false; |
| 85 } | 86 } |
| 86 | 87 |
| 87 int AudioOutputStreamSink::OnMoreData(base::TimeDelta delay, | 88 int AudioOutputStreamSink::OnMoreData(base::TimeDelta delay, |
| 88 base::TimeTicks delay_timestamp, | 89 base::TimeTicks delay_timestamp, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 DCHECK(audio_task_runner_->BelongsToCurrentThread()); | 150 DCHECK(audio_task_runner_->BelongsToCurrentThread()); |
| 150 stream_->SetVolume(volume); | 151 stream_->SetVolume(volume); |
| 151 } | 152 } |
| 152 | 153 |
| 153 void AudioOutputStreamSink::ClearCallback() { | 154 void AudioOutputStreamSink::ClearCallback() { |
| 154 base::AutoLock al(callback_lock_); | 155 base::AutoLock al(callback_lock_); |
| 155 active_render_callback_ = NULL; | 156 active_render_callback_ = NULL; |
| 156 } | 157 } |
| 157 | 158 |
| 158 } // namespace media | 159 } // namespace media |
| OLD | NEW |