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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // is updated to the new number of channels because of use of tryLocks() in | 112 // is updated to the new number of channels because of use of tryLocks() in |
113 // the context's updating system. In this case, if the the buffer has just | 113 // the context's updating system. In this case, if the the buffer has just |
114 // been changed and we're not quite ready yet, then just output silence. | 114 // been changed and we're not quite ready yet, then just output silence. |
115 if (numberOfChannels() != buffer()->numberOfChannels()) { | 115 if (numberOfChannels() != buffer()->numberOfChannels()) { |
116 outputBus->zero(); | 116 outputBus->zero(); |
117 return; | 117 return; |
118 } | 118 } |
119 | 119 |
120 size_t quantumFrameOffset; | 120 size_t quantumFrameOffset; |
121 size_t bufferFramesToProcess; | 121 size_t bufferFramesToProcess; |
| 122 double startTimeOffset; |
122 | 123 |
123 updateSchedulingInfo(framesToProcess, outputBus, quantumFrameOffset, | 124 updateSchedulingInfo(framesToProcess, outputBus, quantumFrameOffset, |
124 bufferFramesToProcess); | 125 bufferFramesToProcess, startTimeOffset); |
125 | 126 |
126 if (!bufferFramesToProcess) { | 127 if (!bufferFramesToProcess) { |
127 outputBus->zero(); | 128 outputBus->zero(); |
128 return; | 129 return; |
129 } | 130 } |
130 | 131 |
131 for (unsigned i = 0; i < outputBus->numberOfChannels(); ++i) | 132 for (unsigned i = 0; i < outputBus->numberOfChannels(); ++i) |
132 m_destinationChannels[i] = outputBus->channel(i)->mutableData(); | 133 m_destinationChannels[i] = outputBus->channel(i)->mutableData(); |
133 | 134 |
134 // Render by reading directly from the buffer. | 135 // Render by reading directly from the buffer. |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 | 755 |
755 void AudioBufferSourceNode::start(double when, | 756 void AudioBufferSourceNode::start(double when, |
756 double grainOffset, | 757 double grainOffset, |
757 double grainDuration, | 758 double grainDuration, |
758 ExceptionState& exceptionState) { | 759 ExceptionState& exceptionState) { |
759 audioBufferSourceHandler().start(when, grainOffset, grainDuration, | 760 audioBufferSourceHandler().start(when, grainOffset, grainDuration, |
760 exceptionState); | 761 exceptionState); |
761 } | 762 } |
762 | 763 |
763 } // namespace blink | 764 } // namespace blink |
OLD | NEW |