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

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

Issue 1256053006: Protect AudioScheduledSoureNode::m_startTime and m_endTime. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert change to OscillatorNode.cpp Created 5 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
« no previous file with comments | « Source/modules/webaudio/AudioScheduledSourceNode.cpp ('k') | no next file » | 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 // Detune value (deviating from the frequency) in Cents. 82 // Detune value (deviating from the frequency) in Cents.
83 RefPtr<AudioParamHandler> m_detune; 83 RefPtr<AudioParamHandler> m_detune;
84 84
85 bool m_firstRender; 85 bool m_firstRender;
86 86
87 // m_virtualReadIndex is a sample-frame index into our buffer representing t he current playback position. 87 // m_virtualReadIndex is a sample-frame index into our buffer representing t he current playback position.
88 // Since it's floating-point, it has sub-sample accuracy. 88 // Since it's floating-point, it has sub-sample accuracy.
89 double m_virtualReadIndex; 89 double m_virtualReadIndex;
90 90
91 // This synchronizes process().
92 mutable Mutex m_processLock;
93
94 // Stores sample-accurate values calculated according to frequency and detun e. 91 // Stores sample-accurate values calculated according to frequency and detun e.
95 AudioFloatArray m_phaseIncrements; 92 AudioFloatArray m_phaseIncrements;
96 AudioFloatArray m_detuneValues; 93 AudioFloatArray m_detuneValues;
97 94
98 // This Persistent doesn't make a reference cycle including the owner 95 // This Persistent doesn't make a reference cycle including the owner
99 // OscillatorNode. 96 // OscillatorNode.
100 Persistent<PeriodicWave> m_periodicWave; 97 Persistent<PeriodicWave> m_periodicWave;
101 }; 98 };
102 99
103 class OscillatorNode final : public AudioScheduledSourceNode { 100 class OscillatorNode final : public AudioScheduledSourceNode {
(...skipping 12 matching lines...) Expand all
116 OscillatorNode(AbstractAudioContext&, float sampleRate); 113 OscillatorNode(AbstractAudioContext&, float sampleRate);
117 OscillatorHandler& oscillatorHandler() const; 114 OscillatorHandler& oscillatorHandler() const;
118 115
119 Member<AudioParam> m_frequency; 116 Member<AudioParam> m_frequency;
120 Member<AudioParam> m_detune; 117 Member<AudioParam> m_detune;
121 }; 118 };
122 119
123 } // namespace blink 120 } // namespace blink
124 121
125 #endif // OscillatorNode_h 122 #endif // OscillatorNode_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioScheduledSourceNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698