| 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class AudioNodeInput; | 34 class AudioNodeInput; |
| 35 class AudioProcessor; | 35 class AudioProcessor; |
| 36 | 36 |
| 37 // AudioBasicProcessorHandler is an AudioHandler with one input and one output | 37 // AudioBasicProcessorHandler is an AudioHandler with one input and one output |
| 38 // where the input and output have the same number of channels. | 38 // where the input and output have the same number of channels. |
| 39 class MODULES_EXPORT AudioBasicProcessorHandler : public AudioHandler { | 39 class MODULES_EXPORT AudioBasicProcessorHandler : public AudioHandler { |
| 40 public: | 40 public: |
| 41 static PassRefPtr<AudioBasicProcessorHandler> create(NodeType, AudioNode&, f
loat sampleRate, PassOwnPtr<AudioProcessor>); | 41 static PassRefPtr<AudioBasicProcessorHandler> create(NodeType, AudioNode&, f
loat sampleRate, PassOwnPtr<AudioProcessor>); |
| 42 virtual ~AudioBasicProcessorHandler(); | 42 ~AudioBasicProcessorHandler() override; |
| 43 | 43 |
| 44 // AudioHandler | 44 // AudioHandler |
| 45 virtual void process(size_t framesToProcess) override final; | 45 void process(size_t framesToProcess) final; |
| 46 virtual void pullInputs(size_t framesToProcess) override final; | 46 void pullInputs(size_t framesToProcess) final; |
| 47 virtual void initialize() override final; | 47 void initialize() final; |
| 48 virtual void uninitialize() override final; | 48 void uninitialize() final; |
| 49 | 49 |
| 50 // Called in the main thread when the number of channels for the input may h
ave changed. | 50 // Called in the main thread when the number of channels for the input may h
ave changed. |
| 51 virtual void checkNumberOfChannelsForInput(AudioNodeInput*) override final; | 51 void checkNumberOfChannelsForInput(AudioNodeInput*) final; |
| 52 | 52 |
| 53 // Returns the number of channels for both the input and the output. | 53 // Returns the number of channels for both the input and the output. |
| 54 unsigned numberOfChannels(); | 54 unsigned numberOfChannels(); |
| 55 AudioProcessor* processor() { return m_processor.get(); } | 55 AudioProcessor* processor() { return m_processor.get(); } |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 AudioBasicProcessorHandler(NodeType, AudioNode&, float sampleRate, PassOwnPt
r<AudioProcessor>); | 58 AudioBasicProcessorHandler(NodeType, AudioNode&, float sampleRate, PassOwnPt
r<AudioProcessor>); |
| 59 virtual double tailTime() const override final; | 59 double tailTime() const final; |
| 60 virtual double latencyTime() const override final; | 60 double latencyTime() const final; |
| 61 | 61 |
| 62 OwnPtr<AudioProcessor> m_processor; | 62 OwnPtr<AudioProcessor> m_processor; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace blink | 65 } // namespace blink |
| 66 | 66 |
| 67 #endif // AudioBasicProcessorHandler_h | 67 #endif // AudioBasicProcessorHandler_h |
| OLD | NEW |