| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 ExceptionMessages::kInclusiveBound)); | 418 ExceptionMessages::kInclusiveBound)); |
| 419 return; | 419 return; |
| 420 } | 420 } |
| 421 | 421 |
| 422 Output(0).SetNumberOfChannels(number_of_channels); | 422 Output(0).SetNumberOfChannels(number_of_channels); |
| 423 | 423 |
| 424 source_channels_ = WrapArrayUnique(new const float*[number_of_channels]); | 424 source_channels_ = WrapArrayUnique(new const float*[number_of_channels]); |
| 425 destination_channels_ = WrapArrayUnique(new float*[number_of_channels]); | 425 destination_channels_ = WrapArrayUnique(new float*[number_of_channels]); |
| 426 | 426 |
| 427 for (unsigned i = 0; i < number_of_channels; ++i) | 427 for (unsigned i = 0; i < number_of_channels; ++i) |
| 428 source_channels_[i] = buffer->getChannelData(i)->Data(); | 428 source_channels_[i] = buffer->getChannelData(i).View()->Data(); |
| 429 | 429 |
| 430 // If this is a grain (as set by a previous call to start()), validate the | 430 // If this is a grain (as set by a previous call to start()), validate the |
| 431 // grain parameters now since it wasn't validated when start was called | 431 // grain parameters now since it wasn't validated when start was called |
| 432 // (because there was no buffer then). | 432 // (because there was no buffer then). |
| 433 if (is_grain_) | 433 if (is_grain_) |
| 434 ClampGrainParameters(buffer); | 434 ClampGrainParameters(buffer); |
| 435 } | 435 } |
| 436 | 436 |
| 437 virtual_read_index_ = 0; | 437 virtual_read_index_ = 0; |
| 438 buffer_ = buffer; | 438 buffer_ = buffer; |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 | 761 |
| 762 void AudioBufferSourceNode::start(double when, | 762 void AudioBufferSourceNode::start(double when, |
| 763 double grain_offset, | 763 double grain_offset, |
| 764 double grain_duration, | 764 double grain_duration, |
| 765 ExceptionState& exception_state) { | 765 ExceptionState& exception_state) { |
| 766 GetAudioBufferSourceHandler().Start(when, grain_offset, grain_duration, | 766 GetAudioBufferSourceHandler().Start(when, grain_offset, grain_duration, |
| 767 exception_state); | 767 exception_state); |
| 768 } | 768 } |
| 769 | 769 |
| 770 } // namespace blink | 770 } // namespace blink |
| OLD | NEW |