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 #ifndef MEDIA_BASE_SINC_RESAMPLER_H_ | 5 #ifndef MEDIA_BASE_SINC_RESAMPLER_H_ |
6 #define MEDIA_BASE_SINC_RESAMPLER_H_ | 6 #define MEDIA_BASE_SINC_RESAMPLER_H_ |
7 | 7 |
8 #include "base/atomic_ref_count.h" | |
9 #include "base/callback.h" | 8 #include "base/callback.h" |
10 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
11 #include "base/memory/aligned_memory.h" | 10 #include "base/memory/aligned_memory.h" |
12 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
13 #include "build/build_config.h" | 12 #include "build/build_config.h" |
14 #include "media/base/media_export.h" | 13 #include "media/base/media_export.h" |
15 | 14 |
16 namespace media { | 15 namespace media { |
17 | 16 |
18 // SincResampler is a high-quality single-channel sample-rate converter. | 17 // SincResampler is a high-quality single-channel sample-rate converter. |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 scoped_ptr<float[], base::AlignedFreeDeleter> input_buffer_; | 128 scoped_ptr<float[], base::AlignedFreeDeleter> input_buffer_; |
130 | 129 |
131 // Pointers to the various regions inside |input_buffer_|. See the diagram at | 130 // Pointers to the various regions inside |input_buffer_|. See the diagram at |
132 // the top of the .cc file for more information. | 131 // the top of the .cc file for more information. |
133 float* r0_; | 132 float* r0_; |
134 float* const r1_; | 133 float* const r1_; |
135 float* const r2_; | 134 float* const r2_; |
136 float* r3_; | 135 float* r3_; |
137 float* r4_; | 136 float* r4_; |
138 | 137 |
139 // Atomic ref count indicating when when we're not currently resampling. Will | |
140 // be CHECK'd to find crashes... | |
141 // TODO(dalecurtis): Remove debug helpers for http://crbug.com/295278 | |
142 base::AtomicRefCount not_currently_resampling_; | |
143 | |
144 DISALLOW_COPY_AND_ASSIGN(SincResampler); | 138 DISALLOW_COPY_AND_ASSIGN(SincResampler); |
145 }; | 139 }; |
146 | 140 |
147 } // namespace media | 141 } // namespace media |
148 | 142 |
149 #endif // MEDIA_BASE_SINC_RESAMPLER_H_ | 143 #endif // MEDIA_BASE_SINC_RESAMPLER_H_ |
OLD | NEW |