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 19 matching lines...) Expand all Loading... |
30 #define AudioBuffer_h | 30 #define AudioBuffer_h |
31 | 31 |
32 #include "bindings/core/v8/ScriptWrappable.h" | 32 #include "bindings/core/v8/ScriptWrappable.h" |
33 #include "core/dom/DOMTypedArray.h" | 33 #include "core/dom/DOMTypedArray.h" |
34 #include "modules/ModulesExport.h" | 34 #include "modules/ModulesExport.h" |
35 #include "wtf/PassRefPtr.h" | 35 #include "wtf/PassRefPtr.h" |
36 #include "wtf/RefPtr.h" | 36 #include "wtf/RefPtr.h" |
37 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
38 #include "wtf/build_config.h" | 38 #include "wtf/build_config.h" |
39 | 39 |
40 #if ENABLE(WEB_AUDIO) | |
41 | |
42 namespace blink { | 40 namespace blink { |
43 | 41 |
44 class AudioBus; | 42 class AudioBus; |
45 class ExceptionState; | 43 class ExceptionState; |
46 | 44 |
47 class MODULES_EXPORT AudioBuffer : public GarbageCollectedFinalized<AudioBuffer>
, public ScriptWrappable { | 45 class MODULES_EXPORT AudioBuffer : public GarbageCollectedFinalized<AudioBuffer>
, public ScriptWrappable { |
48 DEFINE_WRAPPERTYPEINFO(); | 46 DEFINE_WRAPPERTYPEINFO(); |
49 public: | 47 public: |
50 static AudioBuffer* create(unsigned numberOfChannels, size_t numberOfFrames,
float sampleRate); | 48 static AudioBuffer* create(unsigned numberOfChannels, size_t numberOfFrames,
float sampleRate); |
51 static AudioBuffer* create(unsigned numberOfChannels, size_t numberOfFrames,
float sampleRate, ExceptionState&); | 49 static AudioBuffer* create(unsigned numberOfChannels, size_t numberOfFrames,
float sampleRate, ExceptionState&); |
(...skipping 30 matching lines...) Expand all Loading... |
82 bool createdSuccessfully(unsigned desiredNumberOfChannels) const; | 80 bool createdSuccessfully(unsigned desiredNumberOfChannels) const; |
83 | 81 |
84 float m_sampleRate; | 82 float m_sampleRate; |
85 size_t m_length; | 83 size_t m_length; |
86 | 84 |
87 Vector<RefPtr<DOMFloat32Array>> m_channels; | 85 Vector<RefPtr<DOMFloat32Array>> m_channels; |
88 }; | 86 }; |
89 | 87 |
90 } // namespace blink | 88 } // namespace blink |
91 | 89 |
92 #endif // ENABLE(WEB_AUDIO) | |
93 | |
94 #endif // AudioBuffer_h | 90 #endif // AudioBuffer_h |
OLD | NEW |