| 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 20 matching lines...) Expand all Loading... |
| 31 #include "bindings/core/v8/ExceptionState.h" | 31 #include "bindings/core/v8/ExceptionState.h" |
| 32 #include "core/dom/ExceptionCode.h" | 32 #include "core/dom/ExceptionCode.h" |
| 33 #include "platform/audio/AudioUtilities.h" | 33 #include "platform/audio/AudioUtilities.h" |
| 34 #include "modules/webaudio/AudioContext.h" | 34 #include "modules/webaudio/AudioContext.h" |
| 35 #include "modules/webaudio/AudioNodeOutput.h" | 35 #include "modules/webaudio/AudioNodeOutput.h" |
| 36 #include "platform/FloatConversion.h" | 36 #include "platform/FloatConversion.h" |
| 37 #include "wtf/MainThread.h" | 37 #include "wtf/MainThread.h" |
| 38 #include "wtf/MathExtras.h" | 38 #include "wtf/MathExtras.h" |
| 39 #include <algorithm> | 39 #include <algorithm> |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace blink { |
| 42 | 42 |
| 43 const double DefaultGrainDuration = 0.020; // 20ms | 43 const double DefaultGrainDuration = 0.020; // 20ms |
| 44 | 44 |
| 45 // Arbitrary upper limit on playback rate. | 45 // Arbitrary upper limit on playback rate. |
| 46 // Higher than expected rates can be useful when playing back oversampled buffer
s | 46 // Higher than expected rates can be useful when playing back oversampled buffer
s |
| 47 // to minimize linear interpolation aliasing. | 47 // to minimize linear interpolation aliasing. |
| 48 const double MaxRate = 1024; | 48 const double MaxRate = 1024; |
| 49 | 49 |
| 50 PassRefPtrWillBeRawPtr<AudioBufferSourceNode> AudioBufferSourceNode::create(Audi
oContext* context, float sampleRate) | 50 PassRefPtrWillBeRawPtr<AudioBufferSourceNode> AudioBufferSourceNode::create(Audi
oContext* context, float sampleRate) |
| 51 { | 51 { |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 AudioScheduledSourceNode::finish(); | 473 AudioScheduledSourceNode::finish(); |
| 474 } | 474 } |
| 475 | 475 |
| 476 void AudioBufferSourceNode::trace(Visitor* visitor) | 476 void AudioBufferSourceNode::trace(Visitor* visitor) |
| 477 { | 477 { |
| 478 visitor->trace(m_buffer); | 478 visitor->trace(m_buffer); |
| 479 visitor->trace(m_playbackRate); | 479 visitor->trace(m_playbackRate); |
| 480 AudioScheduledSourceNode::trace(visitor); | 480 AudioScheduledSourceNode::trace(visitor); |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace WebCore | 483 } // namespace blink |
| 484 | 484 |
| 485 #endif // ENABLE(WEB_AUDIO) | 485 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |