| 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 "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 "media/base/filter_host.h" | 9 #include "media/base/filter_host.h" |
| 10 #include "media/audio/audio_manager.h" |
| 10 | 11 |
| 11 namespace media { | 12 namespace media { |
| 12 | 13 |
| 13 // We'll try to fill 4096 samples per buffer, which is roughly ~92ms of audio | 14 // We'll try to fill 4096 samples per buffer, which is roughly ~92ms of audio |
| 14 // data for a 44.1kHz audio source. | 15 // data for a 44.1kHz audio source. |
| 15 static const size_t kSamplesPerBuffer = 8*1024; | 16 static const size_t kSamplesPerBuffer = 8*1024; |
| 16 | 17 |
| 17 AudioRendererImpl::AudioRendererImpl() | 18 AudioRendererImpl::AudioRendererImpl() |
| 18 : AudioRendererBase(), | 19 : AudioRendererBase(), |
| 19 stream_(NULL), | 20 stream_(NULL), |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 102 } |
| 102 return true; | 103 return true; |
| 103 } | 104 } |
| 104 | 105 |
| 105 void AudioRendererImpl::OnStop() { | 106 void AudioRendererImpl::OnStop() { |
| 106 if (stream_) | 107 if (stream_) |
| 107 stream_->Stop(); | 108 stream_->Stop(); |
| 108 } | 109 } |
| 109 | 110 |
| 110 } // namespace media | 111 } // namespace media |
| OLD | NEW |