| 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 } | 159 } |
| 160 | 160 |
| 161 for (unsigned i = 0; i < m_numberOfOutputChannels; ++i) | 161 for (unsigned i = 0; i < m_numberOfOutputChannels; ++i) |
| 162 m_renderBus->setChannelMemory(i, audioData[i], numberOfFrames); | 162 m_renderBus->setChannelMemory(i, audioData[i], numberOfFrames); |
| 163 | 163 |
| 164 m_fifo->consume(m_renderBus.get(), numberOfFrames); | 164 m_fifo->consume(m_renderBus.get(), numberOfFrames); |
| 165 } | 165 } |
| 166 | 166 |
| 167 void AudioDestination::provideInput(AudioBus* bus, size_t framesToProcess) | 167 void AudioDestination::provideInput(AudioBus* bus, size_t framesToProcess) |
| 168 { | 168 { |
| 169 AudioBus* sourceBus = 0; | 169 AudioBus* sourceBus = nullptr; |
| 170 if (m_inputFifo->framesInFifo() >= framesToProcess) { | 170 if (m_inputFifo->framesInFifo() >= framesToProcess) { |
| 171 m_inputFifo->consume(m_inputBus.get(), framesToProcess); | 171 m_inputFifo->consume(m_inputBus.get(), framesToProcess); |
| 172 sourceBus = m_inputBus.get(); | 172 sourceBus = m_inputBus.get(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 m_callback.render(sourceBus, bus, framesToProcess); | 175 m_callback.render(sourceBus, bus, framesToProcess); |
| 176 } | 176 } |
| 177 | 177 |
| 178 } // namespace blink | 178 } // namespace blink |
| 179 | 179 |
| 180 #endif // ENABLE(WEB_AUDIO) | 180 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |