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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 ExceptionMessages::InclusiveBound)); | 413 ExceptionMessages::InclusiveBound)); |
414 return; | 414 return; |
415 } | 415 } |
416 | 416 |
417 output(0).setNumberOfChannels(numberOfChannels); | 417 output(0).setNumberOfChannels(numberOfChannels); |
418 | 418 |
419 m_sourceChannels = wrapArrayUnique(new const float*[numberOfChannels]); | 419 m_sourceChannels = wrapArrayUnique(new const float*[numberOfChannels]); |
420 m_destinationChannels = wrapArrayUnique(new float*[numberOfChannels]); | 420 m_destinationChannels = wrapArrayUnique(new float*[numberOfChannels]); |
421 | 421 |
422 for (unsigned i = 0; i < numberOfChannels; ++i) | 422 for (unsigned i = 0; i < numberOfChannels; ++i) |
423 m_sourceChannels[i] = buffer->getChannelData(i)->data(); | 423 m_sourceChannels[i] = buffer->getChannelData(i).view()->data(); |
424 | 424 |
425 // If this is a grain (as set by a previous call to start()), validate the | 425 // If this is a grain (as set by a previous call to start()), validate the |
426 // grain parameters now since it wasn't validated when start was called | 426 // grain parameters now since it wasn't validated when start was called |
427 // (because there was no buffer then). | 427 // (because there was no buffer then). |
428 if (m_isGrain) | 428 if (m_isGrain) |
429 clampGrainParameters(buffer); | 429 clampGrainParameters(buffer); |
430 } | 430 } |
431 | 431 |
432 m_virtualReadIndex = 0; | 432 m_virtualReadIndex = 0; |
433 m_buffer = buffer; | 433 m_buffer = buffer; |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 | 755 |
756 void AudioBufferSourceNode::start(double when, | 756 void AudioBufferSourceNode::start(double when, |
757 double grainOffset, | 757 double grainOffset, |
758 double grainDuration, | 758 double grainDuration, |
759 ExceptionState& exceptionState) { | 759 ExceptionState& exceptionState) { |
760 audioBufferSourceHandler().start(when, grainOffset, grainDuration, | 760 audioBufferSourceHandler().start(when, grainOffset, grainDuration, |
761 exceptionState); | 761 exceptionState); |
762 } | 762 } |
763 | 763 |
764 } // namespace blink | 764 } // namespace blink |
OLD | NEW |