| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 std::unique_ptr<ReverbConvolverStage> stage = | 106 std::unique_ptr<ReverbConvolverStage> stage = |
| 107 WTF::wrapUnique(new ReverbConvolverStage( | 107 WTF::wrapUnique(new ReverbConvolverStage( |
| 108 response, totalResponseLength, reverbTotalLatency, stageOffset, | 108 response, totalResponseLength, reverbTotalLatency, stageOffset, |
| 109 stageSize, fftSize, renderPhase, renderSliceSize, | 109 stageSize, fftSize, renderPhase, renderSliceSize, |
| 110 &m_accumulationBuffer, useDirectConvolver)); | 110 &m_accumulationBuffer, useDirectConvolver)); |
| 111 | 111 |
| 112 bool isBackgroundStage = false; | 112 bool isBackgroundStage = false; |
| 113 | 113 |
| 114 if (useBackgroundThreads && stageOffset > RealtimeFrameLimit) { | 114 if (useBackgroundThreads && stageOffset > RealtimeFrameLimit) { |
| 115 m_backgroundStages.append(std::move(stage)); | 115 m_backgroundStages.push_back(std::move(stage)); |
| 116 isBackgroundStage = true; | 116 isBackgroundStage = true; |
| 117 } else { | 117 } else { |
| 118 m_stages.append(std::move(stage)); | 118 m_stages.push_back(std::move(stage)); |
| 119 } | 119 } |
| 120 | 120 |
| 121 stageOffset += stageSize; | 121 stageOffset += stageSize; |
| 122 ++i; | 122 ++i; |
| 123 | 123 |
| 124 if (!useDirectConvolver) { | 124 if (!useDirectConvolver) { |
| 125 // Figure out next FFT size | 125 // Figure out next FFT size |
| 126 fftSize *= 2; | 126 fftSize *= 2; |
| 127 } | 127 } |
| 128 | 128 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 m_accumulationBuffer.reset(); | 213 m_accumulationBuffer.reset(); |
| 214 m_inputBuffer.reset(); | 214 m_inputBuffer.reset(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 size_t ReverbConvolver::latencyFrames() const { | 217 size_t ReverbConvolver::latencyFrames() const { |
| 218 return 0; | 218 return 0; |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace blink | 221 } // namespace blink |
| OLD | NEW |