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

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

Issue 1227783004: Fix virtual/override/final usage in Source/modules/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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
« 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 class PannerHandler final : public AudioHandler { 46 class PannerHandler final : public AudioHandler {
47 public: 47 public:
48 // These enums are used to distinguish what cached values of panner are dirt y. 48 // These enums are used to distinguish what cached values of panner are dirt y.
49 enum { 49 enum {
50 AzimuthElevationDirty = 0x1, 50 AzimuthElevationDirty = 0x1,
51 DistanceConeGainDirty = 0x2, 51 DistanceConeGainDirty = 0x2,
52 DopplerRateDirty = 0x4, 52 DopplerRateDirty = 0x4,
53 }; 53 };
54 54
55 static PassRefPtr<PannerHandler> create(AudioNode&, float sampleRate); 55 static PassRefPtr<PannerHandler> create(AudioNode&, float sampleRate);
56 virtual ~PannerHandler(); 56 ~PannerHandler() override;
57 57
58 // AudioHandler 58 // AudioHandler
59 virtual void process(size_t framesToProcess) override; 59 void process(size_t framesToProcess) override;
60 virtual void initialize() override; 60 void initialize() override;
61 virtual void uninitialize() override; 61 void uninitialize() override;
62 62
63 // Panning model 63 // Panning model
64 String panningModel() const; 64 String panningModel() const;
65 void setPanningModel(const String&); 65 void setPanningModel(const String&);
66 66
67 // Position, orientation and velocity 67 // Position, orientation and velocity
68 void setPosition(float x, float y, float z); 68 void setPosition(float x, float y, float z);
69 void setOrientation(float x, float y, float z); 69 void setOrientation(float x, float y, float z);
70 void setVelocity(float x, float y, float z); 70 void setVelocity(float x, float y, float z);
71 71
(...skipping 18 matching lines...) Expand all
90 void setConeOuterAngle(double); 90 void setConeOuterAngle(double);
91 91
92 double coneOuterGain() const { return m_coneEffect.outerGain(); } 92 double coneOuterGain() const { return m_coneEffect.outerGain(); }
93 void setConeOuterGain(double); 93 void setConeOuterGain(double);
94 94
95 void markPannerAsDirty(unsigned); 95 void markPannerAsDirty(unsigned);
96 96
97 // It must be called on audio thread, currently called only process() in Aud ioBufferSourceNode. 97 // It must be called on audio thread, currently called only process() in Aud ioBufferSourceNode.
98 double dopplerRate(); 98 double dopplerRate();
99 99
100 virtual double tailTime() const override { return m_panner ? m_panner->tailT ime() : 0; } 100 double tailTime() const override { return m_panner ? m_panner->tailTime() : 0; }
101 virtual double latencyTime() const override { return m_panner ? m_panner->la tencyTime() : 0; } 101 double latencyTime() const override { return m_panner ? m_panner->latencyTim e() : 0; }
102 102
103 virtual void setChannelCount(unsigned long, ExceptionState&) final; 103 void setChannelCount(unsigned long, ExceptionState&) final;
104 virtual void setChannelCountMode(const String&, ExceptionState&) final; 104 void setChannelCountMode(const String&, ExceptionState&) final;
105 105
106 private: 106 private:
107 PannerHandler(AudioNode&, float sampleRate); 107 PannerHandler(AudioNode&, float sampleRate);
108 // AudioContext's listener 108 // AudioContext's listener
109 AudioListener* listener(); 109 AudioListener* listener();
110 110
111 bool setPanningModel(unsigned); // Returns true on success. 111 bool setPanningModel(unsigned); // Returns true on success.
112 bool setDistanceModel(unsigned); // Returns true on success. 112 bool setDistanceModel(unsigned); // Returns true on success.
113 113
114 void calculateAzimuthElevation(double* outAzimuth, double* outElevation); 114 void calculateAzimuthElevation(double* outAzimuth, double* outElevation);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 double coneOuterGain() const; 179 double coneOuterGain() const;
180 void setConeOuterGain(double); 180 void setConeOuterGain(double);
181 181
182 private: 182 private:
183 PannerNode(AudioContext&, float sampleRate); 183 PannerNode(AudioContext&, float sampleRate);
184 }; 184 };
185 185
186 } // namespace blink 186 } // namespace blink
187 187
188 #endif // PannerNode_h 188 #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