OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 15 matching lines...) Expand all Loading... |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 27 */ |
28 | 28 |
29 #ifndef AudioArray_h | 29 #ifndef AudioArray_h |
30 #define AudioArray_h | 30 #define AudioArray_h |
31 | 31 |
32 #include <string.h> | 32 #include <string.h> |
33 #include "wtf/FastMalloc.h" | 33 #include "wtf/FastMalloc.h" |
34 #include "wtf/Vector.h" | 34 #include "wtf/Vector.h" |
35 | 35 |
36 namespace WebCore { | 36 namespace blink { |
37 | 37 |
38 template<typename T> | 38 template<typename T> |
39 class AudioArray { | 39 class AudioArray { |
40 public: | 40 public: |
41 AudioArray() : m_allocation(0), m_alignedData(0), m_size(0) { } | 41 AudioArray() : m_allocation(0), m_alignedData(0), m_size(0) { } |
42 explicit AudioArray(size_t n) : m_allocation(0), m_alignedData(0), m_size(0) | 42 explicit AudioArray(size_t n) : m_allocation(0), m_alignedData(0), m_size(0) |
43 { | 43 { |
44 allocate(n); | 44 allocate(n); |
45 } | 45 } |
46 | 46 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 T* m_alignedData; | 153 T* m_alignedData; |
154 size_t m_size; | 154 size_t m_size; |
155 }; | 155 }; |
156 | 156 |
157 typedef AudioArray<float> AudioFloatArray; | 157 typedef AudioArray<float> AudioFloatArray; |
158 typedef AudioArray<double> AudioDoubleArray; | 158 typedef AudioArray<double> AudioDoubleArray; |
159 | 159 |
160 } // WebCore | 160 } // WebCore |
161 | 161 |
162 #endif // AudioArray_h | 162 #endif // AudioArray_h |
OLD | NEW |