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

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

Issue 438293003: Enable Oilpan by default for webaudio/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // The waveform type. 45 // The waveform type.
46 // These must be defined as in the .idl file. 46 // These must be defined as in the .idl file.
47 enum { 47 enum {
48 SINE = 0, 48 SINE = 0,
49 SQUARE = 1, 49 SQUARE = 1,
50 SAWTOOTH = 2, 50 SAWTOOTH = 2,
51 TRIANGLE = 3, 51 TRIANGLE = 3,
52 CUSTOM = 4 52 CUSTOM = 4
53 }; 53 };
54 54
55 static PassRefPtrWillBeRawPtr<OscillatorNode> create(AudioContext*, float sa mpleRate); 55 static OscillatorNode* create(AudioContext*, float sampleRate);
56 56
57 virtual ~OscillatorNode(); 57 virtual ~OscillatorNode();
58 58
59 // AudioNode 59 // AudioNode
60 virtual void dispose() OVERRIDE; 60 virtual void dispose() OVERRIDE;
61 virtual void process(size_t framesToProcess) OVERRIDE; 61 virtual void process(size_t framesToProcess) OVERRIDE;
62 62
63 String type() const; 63 String type() const;
64 64
65 void setType(const String&); 65 void setType(const String&);
(...skipping 12 matching lines...) Expand all
78 78
79 // Returns true if there are sample-accurate timeline parameter changes. 79 // Returns true if there are sample-accurate timeline parameter changes.
80 bool calculateSampleAccuratePhaseIncrements(size_t framesToProcess); 80 bool calculateSampleAccuratePhaseIncrements(size_t framesToProcess);
81 81
82 virtual bool propagatesSilence() const OVERRIDE; 82 virtual bool propagatesSilence() const OVERRIDE;
83 83
84 // One of the waveform types defined in the enum. 84 // One of the waveform types defined in the enum.
85 unsigned short m_type; 85 unsigned short m_type;
86 86
87 // Frequency value in Hertz. 87 // Frequency value in Hertz.
88 RefPtrWillBeMember<AudioParam> m_frequency; 88 Member<AudioParam> m_frequency;
89 89
90 // Detune value (deviating from the frequency) in Cents. 90 // Detune value (deviating from the frequency) in Cents.
91 RefPtrWillBeMember<AudioParam> m_detune; 91 Member<AudioParam> m_detune;
92 92
93 bool m_firstRender; 93 bool m_firstRender;
94 94
95 // m_virtualReadIndex is a sample-frame index into our buffer representing t he current playback position. 95 // m_virtualReadIndex is a sample-frame index into our buffer representing t he current playback position.
96 // Since it's floating-point, it has sub-sample accuracy. 96 // Since it's floating-point, it has sub-sample accuracy.
97 double m_virtualReadIndex; 97 double m_virtualReadIndex;
98 98
99 // This synchronizes process(). 99 // This synchronizes process().
100 mutable Mutex m_processLock; 100 mutable Mutex m_processLock;
101 101
102 // Stores sample-accurate values calculated according to frequency and detun e. 102 // Stores sample-accurate values calculated according to frequency and detun e.
103 AudioFloatArray m_phaseIncrements; 103 AudioFloatArray m_phaseIncrements;
104 AudioFloatArray m_detuneValues; 104 AudioFloatArray m_detuneValues;
105 105
106 RefPtrWillBeMember<PeriodicWave> m_periodicWave; 106 Member<PeriodicWave> m_periodicWave;
107 }; 107 };
108 108
109 } // namespace blink 109 } // namespace blink
110 110
111 #endif // OscillatorNode_h 111 #endif // OscillatorNode_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/OfflineAudioDestinationNode.cpp ('k') | Source/modules/webaudio/OscillatorNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698