| 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 14 matching lines...) Expand all Loading... |
| 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 ChannelMergerNode_h | 29 #ifndef ChannelMergerNode_h |
| 30 #define ChannelMergerNode_h | 30 #define ChannelMergerNode_h |
| 31 | 31 |
| 32 #include "modules/webaudio/AudioNode.h" | 32 #include "modules/webaudio/AudioNode.h" |
| 33 #include "wtf/PassRefPtr.h" | 33 #include "wtf/PassRefPtr.h" |
| 34 | 34 |
| 35 #if ENABLE(WEB_AUDIO) | |
| 36 | |
| 37 namespace blink { | 35 namespace blink { |
| 38 | 36 |
| 39 class AbstractAudioContext; | 37 class AbstractAudioContext; |
| 40 | 38 |
| 41 class ChannelMergerHandler final : public AudioHandler { | 39 class ChannelMergerHandler final : public AudioHandler { |
| 42 public: | 40 public: |
| 43 static PassRefPtr<ChannelMergerHandler> create(AudioNode&, float sampleRate,
unsigned numberOfInputs); | 41 static PassRefPtr<ChannelMergerHandler> create(AudioNode&, float sampleRate,
unsigned numberOfInputs); |
| 44 | 42 |
| 45 void process(size_t framesToProcess) override; | 43 void process(size_t framesToProcess) override; |
| 46 void setChannelCount(unsigned long, ExceptionState&) final; | 44 void setChannelCount(unsigned long, ExceptionState&) final; |
| 47 void setChannelCountMode(const String&, ExceptionState&) final; | 45 void setChannelCountMode(const String&, ExceptionState&) final; |
| 48 | 46 |
| 49 private: | 47 private: |
| 50 ChannelMergerHandler(AudioNode&, float sampleRate, unsigned numberOfInputs); | 48 ChannelMergerHandler(AudioNode&, float sampleRate, unsigned numberOfInputs); |
| 51 }; | 49 }; |
| 52 | 50 |
| 53 class ChannelMergerNode final : public AudioNode { | 51 class ChannelMergerNode final : public AudioNode { |
| 54 DEFINE_WRAPPERTYPEINFO(); | 52 DEFINE_WRAPPERTYPEINFO(); |
| 55 public: | 53 public: |
| 56 static ChannelMergerNode* create(AbstractAudioContext&, float sampleRate, un
signed numberOfInputs); | 54 static ChannelMergerNode* create(AbstractAudioContext&, float sampleRate, un
signed numberOfInputs); |
| 57 | 55 |
| 58 private: | 56 private: |
| 59 ChannelMergerNode(AbstractAudioContext&, float sampleRate, unsigned numberOf
Inputs); | 57 ChannelMergerNode(AbstractAudioContext&, float sampleRate, unsigned numberOf
Inputs); |
| 60 }; | 58 }; |
| 61 | 59 |
| 62 } // namespace blink | 60 } // namespace blink |
| 63 | 61 |
| 64 #endif // ENABLE(WEB_AUDIO) | |
| 65 | |
| 66 #endif // ChannelMergerNode_h | 62 #endif // ChannelMergerNode_h |
| OLD | NEW |