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

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

Issue 1214463003: Split "Online" and "Offline" AudioContext processing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring to ToT Created 5 years, 5 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 17 matching lines...) Expand all
28 #include "modules/webaudio/AudioParam.h" 28 #include "modules/webaudio/AudioParam.h"
29 #include "modules/webaudio/AudioScheduledSourceNode.h" 29 #include "modules/webaudio/AudioScheduledSourceNode.h"
30 #include "platform/audio/AudioBus.h" 30 #include "platform/audio/AudioBus.h"
31 #include "wtf/OwnPtr.h" 31 #include "wtf/OwnPtr.h"
32 #include "wtf/PassRefPtr.h" 32 #include "wtf/PassRefPtr.h"
33 #include "wtf/RefPtr.h" 33 #include "wtf/RefPtr.h"
34 #include "wtf/Threading.h" 34 #include "wtf/Threading.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class AudioContext; 38 class AbstractAudioContext;
39 class ExceptionState; 39 class ExceptionState;
40 class PeriodicWave; 40 class PeriodicWave;
41 41
42 // OscillatorNode is an audio generator of periodic waveforms. 42 // OscillatorNode is an audio generator of periodic waveforms.
43 43
44 class OscillatorHandler final : public AudioScheduledSourceHandler { 44 class OscillatorHandler final : public AudioScheduledSourceHandler {
45 public: 45 public:
46 // The waveform type. 46 // The waveform type.
47 // These must be defined as in the .idl file. 47 // These must be defined as in the .idl file.
48 enum { 48 enum {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 AudioFloatArray m_detuneValues; 96 AudioFloatArray m_detuneValues;
97 97
98 // This Persistent doesn't make a reference cycle including the owner 98 // This Persistent doesn't make a reference cycle including the owner
99 // OscillatorNode. 99 // OscillatorNode.
100 Persistent<PeriodicWave> m_periodicWave; 100 Persistent<PeriodicWave> m_periodicWave;
101 }; 101 };
102 102
103 class OscillatorNode final : public AudioScheduledSourceNode { 103 class OscillatorNode final : public AudioScheduledSourceNode {
104 DEFINE_WRAPPERTYPEINFO(); 104 DEFINE_WRAPPERTYPEINFO();
105 public: 105 public:
106 static OscillatorNode* create(AudioContext&, float sampleRate); 106 static OscillatorNode* create(AbstractAudioContext&, float sampleRate);
107 DECLARE_VIRTUAL_TRACE(); 107 DECLARE_VIRTUAL_TRACE();
108 108
109 String type() const; 109 String type() const;
110 void setType(const String&, ExceptionState&); 110 void setType(const String&, ExceptionState&);
111 AudioParam* frequency(); 111 AudioParam* frequency();
112 AudioParam* detune(); 112 AudioParam* detune();
113 void setPeriodicWave(PeriodicWave*); 113 void setPeriodicWave(PeriodicWave*);
114 114
115 private: 115 private:
116 OscillatorNode(AudioContext&, float sampleRate); 116 OscillatorNode(AbstractAudioContext&, float sampleRate);
117 OscillatorHandler& oscillatorHandler() const; 117 OscillatorHandler& oscillatorHandler() const;
118 118
119 Member<AudioParam> m_frequency; 119 Member<AudioParam> m_frequency;
120 Member<AudioParam> m_detune; 120 Member<AudioParam> m_detune;
121 }; 121 };
122 122
123 } // namespace blink 123 } // namespace blink
124 124
125 #endif // OscillatorNode_h 125 #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