Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp

Issue 2812833003: Revert of [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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).View()->Data(); 428 source_channels_[i] = buffer->getChannelData(i)->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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp ('k') | third_party/WebKit/Source/modules/webaudio/AudioParam.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698