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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Full initialization can be done here instead of in the constructor. | 58 // Full initialization can be done here instead of in the constructor. |
59 virtual void initialize() = 0; | 59 virtual void initialize() = 0; |
60 virtual void uninitialize() = 0; | 60 virtual void uninitialize() = 0; |
61 | 61 |
62 // Processes the source to destination bus. The number of channels must match | 62 // Processes the source to destination bus. The number of channels must match |
63 // in source and destination. | 63 // in source and destination. |
64 virtual void process(const AudioBus* source, | 64 virtual void process(const AudioBus* source, |
65 AudioBus* destination, | 65 AudioBus* destination, |
66 size_t framesToProcess) = 0; | 66 size_t framesToProcess) = 0; |
67 | 67 |
| 68 // Forces all AudioParams in the processor to run the timeline, |
| 69 // bypassing any other processing the processor would do in |
| 70 // process(). |
| 71 virtual void processOnlyAudioParams(size_t framesToProcess){}; |
| 72 |
68 // Resets filter state | 73 // Resets filter state |
69 virtual void reset() = 0; | 74 virtual void reset() = 0; |
70 | 75 |
71 virtual void setNumberOfChannels(unsigned) = 0; | 76 virtual void setNumberOfChannels(unsigned) = 0; |
72 virtual unsigned numberOfChannels() const = 0; | 77 virtual unsigned numberOfChannels() const = 0; |
73 | 78 |
74 bool isInitialized() const { return m_initialized; } | 79 bool isInitialized() const { return m_initialized; } |
75 | 80 |
76 float sampleRate() const { return m_sampleRate; } | 81 float sampleRate() const { return m_sampleRate; } |
77 | 82 |
78 virtual double tailTime() const = 0; | 83 virtual double tailTime() const = 0; |
79 virtual double latencyTime() const = 0; | 84 virtual double latencyTime() const = 0; |
80 | 85 |
81 protected: | 86 protected: |
82 bool m_initialized; | 87 bool m_initialized; |
83 unsigned m_numberOfChannels; | 88 unsigned m_numberOfChannels; |
84 float m_sampleRate; | 89 float m_sampleRate; |
85 }; | 90 }; |
86 | 91 |
87 } // namespace blink | 92 } // namespace blink |
88 | 93 |
89 #endif // AudioProcessor_h | 94 #endif // AudioProcessor_h |
OLD | NEW |