| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 pullInputs(framesToProcess); | 323 pullInputs(framesToProcess); |
| 324 | 324 |
| 325 bool silentInputs = inputsAreSilent(); | 325 bool silentInputs = inputsAreSilent(); |
| 326 if (!silentInputs) | 326 if (!silentInputs) |
| 327 m_lastNonSilentTime = | 327 m_lastNonSilentTime = |
| 328 (context()->currentSampleFrame() + framesToProcess) / | 328 (context()->currentSampleFrame() + framesToProcess) / |
| 329 static_cast<double>(m_sampleRate); | 329 static_cast<double>(m_sampleRate); |
| 330 | 330 |
| 331 if (silentInputs && propagatesSilence()) { | 331 if (silentInputs && propagatesSilence()) { |
| 332 silenceOutputs(); | 332 silenceOutputs(); |
| 333 // AudioParams still need to be processed so that the value can be updated |
| 334 // if there are automations or so that the upstream nodes get pulled if |
| 335 // any are connected to the AudioParam. |
| 336 processOnlyAudioParams(framesToProcess); |
| 333 } else { | 337 } else { |
| 334 // Unsilence the outputs first because the processing of the node may | 338 // Unsilence the outputs first because the processing of the node may |
| 335 // cause the outputs to go silent and we want to propagate that hint to | 339 // cause the outputs to go silent and we want to propagate that hint to |
| 336 // the downstream nodes. (For example, a Gain node with a gain of 0 will | 340 // the downstream nodes. (For example, a Gain node with a gain of 0 will |
| 337 // want to silence its output.) | 341 // want to silence its output.) |
| 338 unsilenceOutputs(); | 342 unsilenceOutputs(); |
| 339 process(framesToProcess); | 343 process(framesToProcess); |
| 340 } | 344 } |
| 341 } | 345 } |
| 342 } | 346 } |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 } | 947 } |
| 944 | 948 |
| 945 void AudioNode::didAddOutput(unsigned numberOfOutputs) { | 949 void AudioNode::didAddOutput(unsigned numberOfOutputs) { |
| 946 m_connectedNodes.push_back(nullptr); | 950 m_connectedNodes.push_back(nullptr); |
| 947 DCHECK_EQ(numberOfOutputs, m_connectedNodes.size()); | 951 DCHECK_EQ(numberOfOutputs, m_connectedNodes.size()); |
| 948 m_connectedParams.push_back(nullptr); | 952 m_connectedParams.push_back(nullptr); |
| 949 DCHECK_EQ(numberOfOutputs, m_connectedParams.size()); | 953 DCHECK_EQ(numberOfOutputs, m_connectedParams.size()); |
| 950 } | 954 } |
| 951 | 955 |
| 952 } // namespace blink | 956 } // namespace blink |
| OLD | NEW |