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

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

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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/OfflineAudioContext.cpp ('k') | Source/modules/webaudio/PannerNode.cpp » ('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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 OscillatorNode::OscillatorNode(AudioContext* context, float sampleRate) 49 OscillatorNode::OscillatorNode(AudioContext* context, float sampleRate)
50 : AudioScheduledSourceNode(context, sampleRate) 50 : AudioScheduledSourceNode(context, sampleRate)
51 , m_type(SINE) 51 , m_type(SINE)
52 , m_firstRender(true) 52 , m_firstRender(true)
53 , m_virtualReadIndex(0) 53 , m_virtualReadIndex(0)
54 , m_phaseIncrements(AudioNode::ProcessingSizeInFrames) 54 , m_phaseIncrements(AudioNode::ProcessingSizeInFrames)
55 , m_detuneValues(AudioNode::ProcessingSizeInFrames) 55 , m_detuneValues(AudioNode::ProcessingSizeInFrames)
56 { 56 {
57 ScriptWrappable::init(this);
58 setNodeType(NodeTypeOscillator); 57 setNodeType(NodeTypeOscillator);
59 58
60 // Use musical pitch standard A440 as a default. 59 // Use musical pitch standard A440 as a default.
61 m_frequency = AudioParam::create(context, 440); 60 m_frequency = AudioParam::create(context, 440);
62 // Default to no detuning. 61 // Default to no detuning.
63 m_detune = AudioParam::create(context, 0); 62 m_detune = AudioParam::create(context, 0);
64 63
65 // Sets up default wavetable. 64 // Sets up default wavetable.
66 setType(m_type); 65 setType(m_type);
67 66
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 { 348 {
350 visitor->trace(m_frequency); 349 visitor->trace(m_frequency);
351 visitor->trace(m_detune); 350 visitor->trace(m_detune);
352 visitor->trace(m_periodicWave); 351 visitor->trace(m_periodicWave);
353 AudioScheduledSourceNode::trace(visitor); 352 AudioScheduledSourceNode::trace(visitor);
354 } 353 }
355 354
356 } // namespace blink 355 } // namespace blink
357 356
358 #endif // ENABLE(WEB_AUDIO) 357 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/OfflineAudioContext.cpp ('k') | Source/modules/webaudio/PannerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698