| 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::processOnlyAudioParams( |
| 99 size_t framesToProcess) { |
| 100 if (!isInitialized() || !processor()) |
| 101 return; |
| 102 |
| 103 processor()->processOnlyAudioParams(framesToProcess); |
| 104 } |
| 105 |
| 98 // Nice optimization in the very common case allowing for "in-place" processing | 106 // Nice optimization in the very common case allowing for "in-place" processing |
| 99 void AudioBasicProcessorHandler::pullInputs(size_t framesToProcess) { | 107 void AudioBasicProcessorHandler::pullInputs(size_t framesToProcess) { |
| 100 // Render input stream - suggest to the input to render directly into output | 108 // Render input stream - suggest to the input to render directly into output |
| 101 // bus for in-place processing in process() if possible. | 109 // bus for in-place processing in process() if possible. |
| 102 input(0).pull(output(0).bus(), framesToProcess); | 110 input(0).pull(output(0).bus(), framesToProcess); |
| 103 } | 111 } |
| 104 | 112 |
| 105 // As soon as we know the channel count of our input, we can lazily initialize. | 113 // 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 | 114 // 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 | 115 // 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 | 153 |
| 146 double AudioBasicProcessorHandler::tailTime() const { | 154 double AudioBasicProcessorHandler::tailTime() const { |
| 147 return m_processor->tailTime(); | 155 return m_processor->tailTime(); |
| 148 } | 156 } |
| 149 | 157 |
| 150 double AudioBasicProcessorHandler::latencyTime() const { | 158 double AudioBasicProcessorHandler::latencyTime() const { |
| 151 return m_processor->latencyTime(); | 159 return m_processor->latencyTime(); |
| 152 } | 160 } |
| 153 | 161 |
| 154 } // namespace blink | 162 } // namespace blink |
| OLD | NEW |