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 12 matching lines...) Expand all Loading... |
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
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 AudioChannel_h | 29 #ifndef AudioChannel_h |
30 #define AudioChannel_h | 30 #define AudioChannel_h |
31 | 31 |
32 #include "core/platform/audio/AudioArray.h" | 32 #include "core/platform/audio/AudioArray.h" |
33 #include <wtf/PassOwnPtr.h> | 33 #include "wtf/PassOwnPtr.h" |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 // An AudioChannel represents a buffer of non-interleaved floating-point audio s
amples. | 37 // An AudioChannel represents a buffer of non-interleaved floating-point audio s
amples. |
38 // The PCM samples are normally assumed to be in a nominal range -1.0 -> +1.0 | 38 // The PCM samples are normally assumed to be in a nominal range -1.0 -> +1.0 |
39 class AudioChannel { | 39 class AudioChannel { |
40 WTF_MAKE_NONCOPYABLE(AudioChannel); | 40 WTF_MAKE_NONCOPYABLE(AudioChannel); |
41 public: | 41 public: |
42 // Memory can be externally referenced, or can be internally allocated with
an AudioFloatArray. | 42 // Memory can be externally referenced, or can be internally allocated with
an AudioFloatArray. |
43 | 43 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 size_t m_length; | 130 size_t m_length; |
131 | 131 |
132 float* m_rawPointer; | 132 float* m_rawPointer; |
133 OwnPtr<AudioFloatArray> m_memBuffer; | 133 OwnPtr<AudioFloatArray> m_memBuffer; |
134 bool m_silent; | 134 bool m_silent; |
135 }; | 135 }; |
136 | 136 |
137 } // WebCore | 137 } // WebCore |
138 | 138 |
139 #endif // AudioChannel_h | 139 #endif // AudioChannel_h |
OLD | NEW |