| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <cmath> | 5 #include <cmath> |
| 6 | 6 |
| 7 #include "media/base/filter_host.h" | 7 #include "media/base/filter_host.h" |
| 8 #include "media/filters/null_audio_renderer.h" | 8 #include "media/filters/null_audio_renderer.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 buffer_.reset(new uint8[buffer_size_]); | 79 buffer_.reset(new uint8[buffer_size_]); |
| 80 DCHECK(buffer_.get()); | 80 DCHECK(buffer_.get()); |
| 81 | 81 |
| 82 // It's safe to start the thread now because it simply sleeps when playback | 82 // It's safe to start the thread now because it simply sleeps when playback |
| 83 // rate is 0.0f. | 83 // rate is 0.0f. |
| 84 return PlatformThread::Create(0, this, &thread_); | 84 return PlatformThread::Create(0, this, &thread_); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void NullAudioRenderer::OnStop() { | 87 void NullAudioRenderer::OnStop() { |
| 88 shutdown_ = true; | 88 shutdown_ = true; |
| 89 if (thread_) | 89 if (thread_) { |
| 90 PlatformThread::Join(thread_); | 90 PlatformThread::Join(thread_); |
| 91 thread_ = NULL; |
| 92 } |
| 91 } | 93 } |
| 92 | 94 |
| 93 } // namespace media | 95 } // namespace media |
| OLD | NEW |