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 16 matching lines...) Expand all Loading... |
27 */ | 27 */ |
28 | 28 |
29 #ifndef AudioChannel_h | 29 #ifndef AudioChannel_h |
30 #define AudioChannel_h | 30 #define AudioChannel_h |
31 | 31 |
32 #include "platform/PlatformExport.h" | 32 #include "platform/PlatformExport.h" |
33 #include "platform/audio/AudioArray.h" | 33 #include "platform/audio/AudioArray.h" |
34 #include "wtf/Allocator.h" | 34 #include "wtf/Allocator.h" |
35 #include "wtf/PassOwnPtr.h" | 35 #include "wtf/PassOwnPtr.h" |
36 | 36 |
37 #if ENABLE(WEB_AUDIO) | |
38 | |
39 namespace blink { | 37 namespace blink { |
40 | 38 |
41 // An AudioChannel represents a buffer of non-interleaved floating-point audio s
amples. | 39 // An AudioChannel represents a buffer of non-interleaved floating-point audio s
amples. |
42 // The PCM samples are normally assumed to be in a nominal range -1.0 -> +1.0 | 40 // The PCM samples are normally assumed to be in a nominal range -1.0 -> +1.0 |
43 class PLATFORM_EXPORT AudioChannel { | 41 class PLATFORM_EXPORT AudioChannel { |
44 USING_FAST_MALLOC(AudioChannel); | 42 USING_FAST_MALLOC(AudioChannel); |
45 WTF_MAKE_NONCOPYABLE(AudioChannel); | 43 WTF_MAKE_NONCOPYABLE(AudioChannel); |
46 public: | 44 public: |
47 // Memory can be externally referenced, or can be internally allocated with
an AudioFloatArray. | 45 // Memory can be externally referenced, or can be internally allocated with
an AudioFloatArray. |
48 | 46 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 private: | 132 private: |
135 size_t m_length; | 133 size_t m_length; |
136 | 134 |
137 float* m_rawPointer; | 135 float* m_rawPointer; |
138 OwnPtr<AudioFloatArray> m_memBuffer; | 136 OwnPtr<AudioFloatArray> m_memBuffer; |
139 bool m_silent; | 137 bool m_silent; |
140 }; | 138 }; |
141 | 139 |
142 } // namespace blink | 140 } // namespace blink |
143 | 141 |
144 #endif // ENABLE(WEB_AUDIO) | |
145 | |
146 #endif // AudioChannel_h | 142 #endif // AudioChannel_h |
OLD | NEW |