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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // to minimize linear interpolation aliasing. | 50 // to minimize linear interpolation aliasing. |
51 const double MaxRate = 1024; | 51 const double MaxRate = 1024; |
52 | 52 |
53 PassRefPtr<AudioBufferSourceNode> AudioBufferSourceNode::create(AudioContext* co
ntext, float sampleRate) | 53 PassRefPtr<AudioBufferSourceNode> AudioBufferSourceNode::create(AudioContext* co
ntext, float sampleRate) |
54 { | 54 { |
55 return adoptRef(new AudioBufferSourceNode(context, sampleRate)); | 55 return adoptRef(new AudioBufferSourceNode(context, sampleRate)); |
56 } | 56 } |
57 | 57 |
58 AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* context, float sample
Rate) | 58 AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* context, float sample
Rate) |
59 : AudioScheduledSourceNode(context, sampleRate) | 59 : AudioScheduledSourceNode(context, sampleRate) |
60 , m_buffer(0) | 60 , m_buffer(nullptr) |
61 , m_isLooping(false) | 61 , m_isLooping(false) |
62 , m_loopStart(0) | 62 , m_loopStart(0) |
63 , m_loopEnd(0) | 63 , m_loopEnd(0) |
64 , m_virtualReadIndex(0) | 64 , m_virtualReadIndex(0) |
65 , m_isGrain(false) | 65 , m_isGrain(false) |
66 , m_grainOffset(0.0) | 66 , m_grainOffset(0.0) |
67 , m_grainDuration(DefaultGrainDuration) | 67 , m_grainDuration(DefaultGrainDuration) |
68 , m_lastGain(1.0) | 68 , m_lastGain(1.0) |
69 , m_pannerNode(0) | 69 , m_pannerNode(0) |
70 { | 70 { |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 void AudioBufferSourceNode::finish() | 503 void AudioBufferSourceNode::finish() |
504 { | 504 { |
505 clearPannerNode(); | 505 clearPannerNode(); |
506 ASSERT(!m_pannerNode); | 506 ASSERT(!m_pannerNode); |
507 AudioScheduledSourceNode::finish(); | 507 AudioScheduledSourceNode::finish(); |
508 } | 508 } |
509 | 509 |
510 } // namespace WebCore | 510 } // namespace WebCore |
511 | 511 |
512 #endif // ENABLE(WEB_AUDIO) | 512 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |