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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 // FIXME: if we take "tail time" into account, then we can avoid calling | 89 // FIXME: if we take "tail time" into account, then we can avoid calling |
90 // processor()->process() once the tail dies down. | 90 // processor()->process() once the tail dies down. |
91 if (!input(0).isConnected()) | 91 if (!input(0).isConnected()) |
92 sourceBus->zero(); | 92 sourceBus->zero(); |
93 | 93 |
94 processor()->process(sourceBus, destinationBus, framesToProcess); | 94 processor()->process(sourceBus, destinationBus, framesToProcess); |
95 } | 95 } |
96 } | 96 } |
97 | 97 |
| 98 void AudioBasicProcessorHandler::processAudioParams(size_t framesToProcess) { |
| 99 if (!isInitialized() || !processor()) |
| 100 return; |
| 101 |
| 102 processor()->processAudioParams(framesToProcess); |
| 103 } |
| 104 |
98 // Nice optimization in the very common case allowing for "in-place" processing | 105 // Nice optimization in the very common case allowing for "in-place" processing |
99 void AudioBasicProcessorHandler::pullInputs(size_t framesToProcess) { | 106 void AudioBasicProcessorHandler::pullInputs(size_t framesToProcess) { |
100 // Render input stream - suggest to the input to render directly into output | 107 // Render input stream - suggest to the input to render directly into output |
101 // bus for in-place processing in process() if possible. | 108 // bus for in-place processing in process() if possible. |
102 input(0).pull(output(0).bus(), framesToProcess); | 109 input(0).pull(output(0).bus(), framesToProcess); |
103 } | 110 } |
104 | 111 |
105 // As soon as we know the channel count of our input, we can lazily initialize. | 112 // As soon as we know the channel count of our input, we can lazily initialize. |
106 // Sometimes this may be called more than once with different channel counts, in | 113 // Sometimes this may be called more than once with different channel counts, in |
107 // which case we must safely uninitialize and then re-initialize with the new | 114 // which case we must safely uninitialize and then re-initialize with the new |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 152 |
146 double AudioBasicProcessorHandler::tailTime() const { | 153 double AudioBasicProcessorHandler::tailTime() const { |
147 return m_processor->tailTime(); | 154 return m_processor->tailTime(); |
148 } | 155 } |
149 | 156 |
150 double AudioBasicProcessorHandler::latencyTime() const { | 157 double AudioBasicProcessorHandler::latencyTime() const { |
151 return m_processor->latencyTime(); | 158 return m_processor->latencyTime(); |
152 } | 159 } |
153 | 160 |
154 } // namespace blink | 161 } // namespace blink |
OLD | NEW |