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

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

Issue 205173002: Move webaudio to oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.h ('k') | Source/modules/webaudio/AudioContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 const double DefaultGrainDuration = 0.020; // 20ms 45 const double DefaultGrainDuration = 0.020; // 20ms
46 46
47 // Arbitrary upper limit on playback rate. 47 // Arbitrary upper limit on playback rate.
48 // Higher than expected rates can be useful when playing back oversampled buffer s 48 // Higher than expected rates can be useful when playing back oversampled buffer s
49 // to minimize linear interpolation aliasing. 49 // to minimize linear interpolation aliasing.
50 const double MaxRate = 1024; 50 const double MaxRate = 1024;
51 51
52 PassRefPtr<AudioBufferSourceNode> AudioBufferSourceNode::create(AudioContext* co ntext, float sampleRate) 52 PassRefPtrWillBeRawPtr<AudioBufferSourceNode> AudioBufferSourceNode::create(Audi oContext* context, float sampleRate)
53 { 53 {
54 return adoptRef(new AudioBufferSourceNode(context, sampleRate)); 54 return adoptRefWillBeNoop(new AudioBufferSourceNode(context, sampleRate));
55 } 55 }
56 56
57 AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* context, float sample Rate) 57 AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* context, float sample Rate)
58 : AudioScheduledSourceNode(context, sampleRate) 58 : AudioScheduledSourceNode(context, sampleRate)
59 , m_buffer(nullptr) 59 , m_buffer(nullptr)
60 , m_isLooping(false) 60 , m_isLooping(false)
61 , m_loopStart(0) 61 , m_loopStart(0)
62 , m_loopEnd(0) 62 , m_loopEnd(0)
63 , m_virtualReadIndex(0) 63 , m_virtualReadIndex(0)
64 , m_isGrain(false) 64 , m_isGrain(false)
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 } 468 }
469 } 469 }
470 470
471 void AudioBufferSourceNode::finish() 471 void AudioBufferSourceNode::finish()
472 { 472 {
473 clearPannerNode(); 473 clearPannerNode();
474 ASSERT(!m_pannerNode); 474 ASSERT(!m_pannerNode);
475 AudioScheduledSourceNode::finish(); 475 AudioScheduledSourceNode::finish();
476 } 476 }
477 477
478 void AudioBufferSourceNode::trace(Visitor* visitor)
479 {
480 visitor->trace(m_buffer);
481 visitor->trace(m_playbackRate);
482 AudioScheduledSourceNode::trace(visitor);
483 }
484
478 } // namespace WebCore 485 } // namespace WebCore
479 486
480 #endif // ENABLE(WEB_AUDIO) 487 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.h ('k') | Source/modules/webaudio/AudioContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698