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 ReverbInputBuffer_h | 29 #ifndef ReverbInputBuffer_h |
30 #define ReverbInputBuffer_h | 30 #define ReverbInputBuffer_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/Noncopyable.h" | 35 #include "wtf/Noncopyable.h" |
36 | 36 |
37 #if ENABLE(WEB_AUDIO) | |
38 | |
39 namespace blink { | 37 namespace blink { |
40 | 38 |
41 // ReverbInputBuffer is used to buffer input samples for deferred processing by
the background threads. | 39 // ReverbInputBuffer is used to buffer input samples for deferred processing by
the background threads. |
42 class PLATFORM_EXPORT ReverbInputBuffer { | 40 class PLATFORM_EXPORT ReverbInputBuffer { |
43 DISALLOW_NEW(); | 41 DISALLOW_NEW(); |
44 WTF_MAKE_NONCOPYABLE(ReverbInputBuffer); | 42 WTF_MAKE_NONCOPYABLE(ReverbInputBuffer); |
45 public: | 43 public: |
46 ReverbInputBuffer(size_t length); | 44 ReverbInputBuffer(size_t length); |
47 | 45 |
48 // The realtime audio thread keeps writing samples here. | 46 // The realtime audio thread keeps writing samples here. |
(...skipping 12 matching lines...) Expand all Loading... |
61 | 59 |
62 void reset(); | 60 void reset(); |
63 | 61 |
64 private: | 62 private: |
65 AudioFloatArray m_buffer; | 63 AudioFloatArray m_buffer; |
66 size_t m_writeIndex; | 64 size_t m_writeIndex; |
67 }; | 65 }; |
68 | 66 |
69 } // namespace blink | 67 } // namespace blink |
70 | 68 |
71 #endif // ENABLE(WEB_AUDIO) | |
72 | |
73 #endif // ReverbInputBuffer_h | 69 #endif // ReverbInputBuffer_h |
OLD | NEW |