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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
434 | 434 |
435 void AudioBufferSourceHandler::start(double when, double grainOffset, double gra inDuration, ExceptionState& exceptionState) | 435 void AudioBufferSourceHandler::start(double when, double grainOffset, double gra inDuration, ExceptionState& exceptionState) |
436 { | 436 { |
437 startSource(when, grainOffset, grainDuration, true, exceptionState); | 437 startSource(when, grainOffset, grainDuration, true, exceptionState); |
438 } | 438 } |
439 | 439 |
440 void AudioBufferSourceHandler::startSource(double when, double grainOffset, doub le grainDuration, bool isDurationGiven, ExceptionState& exceptionState) | 440 void AudioBufferSourceHandler::startSource(double when, double grainOffset, doub le grainDuration, bool isDurationGiven, ExceptionState& exceptionState) |
441 { | 441 { |
442 ASSERT(isMainThread()); | 442 ASSERT(isMainThread()); |
443 | 443 |
444 context()->recordUserGestureState(); | |
Raymond Toy
2016/06/06 15:10:08
Probably want this after all of the code that coul
mlamouri (slow - plz ping)
2016/06/06 16:14:13
WebKit puts it exactly here actually :(
| |
445 | |
444 if (playbackState() != UNSCHEDULED_STATE) { | 446 if (playbackState() != UNSCHEDULED_STATE) { |
445 exceptionState.throwDOMException( | 447 exceptionState.throwDOMException( |
446 InvalidStateError, | 448 InvalidStateError, |
447 "cannot call start more than once."); | 449 "cannot call start more than once."); |
448 return; | 450 return; |
449 } | 451 } |
450 | 452 |
451 if (when < 0) { | 453 if (when < 0) { |
452 exceptionState.throwDOMException( | 454 exceptionState.throwDOMException( |
453 InvalidStateError, | 455 InvalidStateError, |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
681 { | 683 { |
682 audioBufferSourceHandler().start(when, grainOffset, exceptionState); | 684 audioBufferSourceHandler().start(when, grainOffset, exceptionState); |
683 } | 685 } |
684 | 686 |
685 void AudioBufferSourceNode::start(double when, double grainOffset, double grainD uration, ExceptionState& exceptionState) | 687 void AudioBufferSourceNode::start(double when, double grainOffset, double grainD uration, ExceptionState& exceptionState) |
686 { | 688 { |
687 audioBufferSourceHandler().start(when, grainOffset, grainDuration, exception State); | 689 audioBufferSourceHandler().start(when, grainOffset, grainDuration, exception State); |
688 } | 690 } |
689 | 691 |
690 } // namespace blink | 692 } // namespace blink |
OLD | NEW |