OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <algorithm> |
5 #include <cmath> | 6 #include <cmath> |
6 | 7 |
| 8 #include "base/logging.h" |
7 #include "media/base/filter_host.h" | 9 #include "media/base/filter_host.h" |
8 #include "media/filters/null_audio_renderer.h" | 10 #include "media/filters/null_audio_renderer.h" |
9 | 11 |
10 namespace media { | 12 namespace media { |
11 | 13 |
12 // How "long" our buffer should be in terms of milliseconds. In OnInitialize | 14 // How "long" our buffer should be in terms of milliseconds. In OnInitialize |
13 // we calculate the size of one second of audio data and use this number to | 15 // we calculate the size of one second of audio data and use this number to |
14 // allocate a buffer to pass to FillBuffer. | 16 // allocate a buffer to pass to FillBuffer. |
15 static const size_t kBufferSizeInMilliseconds = 100; | 17 static const size_t kBufferSizeInMilliseconds = 100; |
16 | 18 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 81 |
80 void NullAudioRenderer::OnStop() { | 82 void NullAudioRenderer::OnStop() { |
81 shutdown_ = true; | 83 shutdown_ = true; |
82 if (thread_) { | 84 if (thread_) { |
83 PlatformThread::Join(thread_); | 85 PlatformThread::Join(thread_); |
84 thread_ = kNullThreadHandle; | 86 thread_ = kNullThreadHandle; |
85 } | 87 } |
86 } | 88 } |
87 | 89 |
88 } // namespace media | 90 } // namespace media |
OLD | NEW |