| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 #include "modules/webaudio/AudioBufferSourceNode.h" | 25 #include "modules/webaudio/AudioBufferSourceNode.h" |
| 26 #include "bindings/core/v8/ExceptionMessages.h" | 26 #include "bindings/core/v8/ExceptionMessages.h" |
| 27 #include "bindings/core/v8/ExceptionState.h" | 27 #include "bindings/core/v8/ExceptionState.h" |
| 28 #include "core/dom/ExceptionCode.h" | 28 #include "core/dom/ExceptionCode.h" |
| 29 #include "core/frame/UseCounter.h" | 29 #include "core/frame/UseCounter.h" |
| 30 #include "modules/webaudio/AbstractAudioContext.h" | 30 #include "modules/webaudio/AbstractAudioContext.h" |
| 31 #include "modules/webaudio/AudioNodeOutput.h" | 31 #include "modules/webaudio/AudioNodeOutput.h" |
| 32 #include "platform/FloatConversion.h" | 32 #include "platform/FloatConversion.h" |
| 33 #include "platform/audio/AudioUtilities.h" | 33 #include "platform/audio/AudioUtilities.h" |
| 34 #include "wtf/MainThread.h" | |
| 35 #include "wtf/MathExtras.h" | 34 #include "wtf/MathExtras.h" |
| 36 #include <algorithm> | 35 #include <algorithm> |
| 37 | 36 |
| 38 namespace blink { | 37 namespace blink { |
| 39 | 38 |
| 40 const double DefaultGrainDuration = 0.020; // 20ms | 39 const double DefaultGrainDuration = 0.020; // 20ms |
| 41 | 40 |
| 42 // Arbitrary upper limit on playback rate. | 41 // Arbitrary upper limit on playback rate. |
| 43 // Higher than expected rates can be useful when playing back oversampled buffer
s | 42 // Higher than expected rates can be useful when playing back oversampled buffer
s |
| 44 // to minimize linear interpolation aliasing. | 43 // to minimize linear interpolation aliasing. |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 { | 670 { |
| 672 audioBufferSourceHandler().start(when, grainOffset, exceptionState); | 671 audioBufferSourceHandler().start(when, grainOffset, exceptionState); |
| 673 } | 672 } |
| 674 | 673 |
| 675 void AudioBufferSourceNode::start(double when, double grainOffset, double grainD
uration, ExceptionState& exceptionState) | 674 void AudioBufferSourceNode::start(double when, double grainOffset, double grainD
uration, ExceptionState& exceptionState) |
| 676 { | 675 { |
| 677 audioBufferSourceHandler().start(when, grainOffset, grainDuration, exception
State); | 676 audioBufferSourceHandler().start(when, grainOffset, grainDuration, exception
State); |
| 678 } | 677 } |
| 679 | 678 |
| 680 } // namespace blink | 679 } // namespace blink |
| OLD | NEW |