| 23 | // Despite this limitation it turns out to be a very common and useful type of processor. |
| 24 | |
| 25 | class AudioDSPKernelProcessor : public AudioProcessor |
| 26 | { |
| 27 | public: |
| 28 | // numberOfChannels may be later changed if object is not yet in an "initialized" state |
| 29 | AudioDSPKernelProcessor(); |
| 30 | virtual ~AudioDSPKernelProcessor() |
| 31 | { |
| 32 | if (isInitialized()) uninitialize(); |
| 33 | } |
| 34 | |
| 35 | // Subclasses create the appropriate type of processing kernel here. |
| 36 | // We'll call this to create a kernel for each channel. |
| 37 | virtual AudioDSPKernel * createKernel() = 0; |
| 38 | |
| 39 | // AudioProcessor methods |
| 40 | virtual void initialize() override; |
| 41 | virtual void uninitialize() override; |
| 42 | virtual void process(ContextRenderLock &, const AudioBus * source, AudioBus * destination, int framesToProcess) override; |
| 43 | virtual void reset() override; |
| 44 | |
| 45 | virtual double tailTime(ContextRenderLock & r) const override; |
| 46 | virtual double latencyTime(ContextRenderLock & r) const override; |
| 47 | |
| 48 | protected: |
| 49 | std::vector<std::unique_ptr<AudioDSPKernel>> m_kernels; |
| 50 | bool m_hasJustReset; |
| 51 | }; |
| 52 | |
| 53 | } // namespace lab |
| 54 |
nothing calls this directly
no outgoing calls
no test coverage detected