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

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

Issue 135653002: Update modules classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove change to web/ Created 6 years, 11 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/OscillatorNode.h ('k') | Source/modules/webaudio/ScriptProcessorNode.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 27 matching lines...) Expand all
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 // PannerNode is an AudioNode with one input and one output. 41 // PannerNode is an AudioNode with one input and one output.
42 // It positions a sound in 3D space, with the exact effect dependent on the pann ing model. 42 // It positions a sound in 3D space, with the exact effect dependent on the pann ing model.
43 // It has a position and an orientation in 3D space which is relative to the pos ition and orientation of the context's AudioListener. 43 // It has a position and an orientation in 3D space which is relative to the pos ition and orientation of the context's AudioListener.
44 // A distance effect will attenuate the gain as the position moves away from the listener. 44 // A distance effect will attenuate the gain as the position moves away from the listener.
45 // A cone effect will attenuate the gain as the orientation moves away from the listener. 45 // A cone effect will attenuate the gain as the orientation moves away from the listener.
46 // All of these effects follow the OpenAL specification very closely. 46 // All of these effects follow the OpenAL specification very closely.
47 47
48 class PannerNode : public AudioNode { 48 class PannerNode FINAL : public AudioNode {
49 public: 49 public:
50 // These must be defined as in the .idl file and must match those in the Pan ner class. 50 // These must be defined as in the .idl file and must match those in the Pan ner class.
51 enum { 51 enum {
52 EQUALPOWER = 0, 52 EQUALPOWER = 0,
53 HRTF = 1, 53 HRTF = 1,
54 SOUNDFIELD = 2, 54 SOUNDFIELD = 2,
55 }; 55 };
56 56
57 // These must be defined as in the .idl file and must match those 57 // These must be defined as in the .idl file and must match those
58 // in the DistanceEffect class. 58 // in the DistanceEffect class.
59 enum { 59 enum {
60 LINEAR_DISTANCE = 0, 60 LINEAR_DISTANCE = 0,
61 INVERSE_DISTANCE = 1, 61 INVERSE_DISTANCE = 1,
62 EXPONENTIAL_DISTANCE = 2, 62 EXPONENTIAL_DISTANCE = 2,
63 }; 63 };
64 64
65 static PassRefPtr<PannerNode> create(AudioContext* context, float sampleRate ) 65 static PassRefPtr<PannerNode> create(AudioContext* context, float sampleRate )
66 { 66 {
67 return adoptRef(new PannerNode(context, sampleRate)); 67 return adoptRef(new PannerNode(context, sampleRate));
68 } 68 }
69 69
70 virtual ~PannerNode(); 70 virtual ~PannerNode();
71 71
72 // AudioNode 72 // AudioNode
73 virtual void process(size_t framesToProcess); 73 virtual void process(size_t framesToProcess) OVERRIDE;
74 virtual void pullInputs(size_t framesToProcess); 74 virtual void pullInputs(size_t framesToProcess) OVERRIDE;
75 virtual void reset(); 75 virtual void reset() OVERRIDE;
76 virtual void initialize(); 76 virtual void initialize() OVERRIDE;
77 virtual void uninitialize(); 77 virtual void uninitialize() OVERRIDE;
78 78
79 // Listener 79 // Listener
80 AudioListener* listener(); 80 AudioListener* listener();
81 81
82 // Panning model 82 // Panning model
83 String panningModel() const; 83 String panningModel() const;
84 bool setPanningModel(unsigned); // Returns true on success. 84 bool setPanningModel(unsigned); // Returns true on success.
85 void setPanningModel(const String&); 85 void setPanningModel(const String&);
86 86
87 // Position 87 // Position
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 unsigned m_connectionCount; 157 unsigned m_connectionCount;
158 158
159 // Synchronize process() and setPanningModel() which can change the panner. 159 // Synchronize process() and setPanningModel() which can change the panner.
160 mutable Mutex m_pannerLock; 160 mutable Mutex m_pannerLock;
161 }; 161 };
162 162
163 } // namespace WebCore 163 } // namespace WebCore
164 164
165 #endif // PannerNode_h 165 #endif // PannerNode_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/OscillatorNode.h ('k') | Source/modules/webaudio/ScriptProcessorNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698