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

Side by Side Diff: Source/modules/webaudio/GainNode.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
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 19 matching lines...) Expand all
30 #include "wtf/PassRefPtr.h" 30 #include "wtf/PassRefPtr.h"
31 #include "wtf/Threading.h" 31 #include "wtf/Threading.h"
32 32
33 namespace WebCore { 33 namespace WebCore {
34 34
35 class AudioContext; 35 class AudioContext;
36 36
37 // GainNode is an AudioNode with one input and one output which applies a gain ( volume) change to the audio signal. 37 // GainNode is an AudioNode with one input and one output which applies a gain ( volume) change to the audio signal.
38 // De-zippering (smoothing) is applied when the gain value is changed dynamicall y. 38 // De-zippering (smoothing) is applied when the gain value is changed dynamicall y.
39 39
40 class GainNode : public AudioNode { 40 class GainNode FINAL : public AudioNode {
41 public: 41 public:
42 static PassRefPtr<GainNode> create(AudioContext* context, float sampleRate) 42 static PassRefPtr<GainNode> create(AudioContext* context, float sampleRate)
43 { 43 {
44 return adoptRef(new GainNode(context, sampleRate)); 44 return adoptRef(new GainNode(context, sampleRate));
45 } 45 }
46 46
47 // AudioNode 47 // AudioNode
48 virtual void process(size_t framesToProcess); 48 virtual void process(size_t framesToProcess) OVERRIDE;
49 virtual void reset(); 49 virtual void reset() OVERRIDE;
50 50
51 // Called in the main thread when the number of channels for the input may h ave changed. 51 // Called in the main thread when the number of channels for the input may h ave changed.
52 virtual void checkNumberOfChannelsForInput(AudioNodeInput*); 52 virtual void checkNumberOfChannelsForInput(AudioNodeInput*) OVERRIDE;
53 53
54 // JavaScript interface 54 // JavaScript interface
55 AudioParam* gain() { return m_gain.get(); } 55 AudioParam* gain() { return m_gain.get(); }
56 56
57 private: 57 private:
58 virtual double tailTime() const OVERRIDE { return 0; } 58 virtual double tailTime() const OVERRIDE { return 0; }
59 virtual double latencyTime() const OVERRIDE { return 0; } 59 virtual double latencyTime() const OVERRIDE { return 0; }
60 60
61 GainNode(AudioContext*, float sampleRate); 61 GainNode(AudioContext*, float sampleRate);
62 62
63 float m_lastGain; // for de-zippering 63 float m_lastGain; // for de-zippering
64 RefPtr<AudioParam> m_gain; 64 RefPtr<AudioParam> m_gain;
65 65
66 AudioFloatArray m_sampleAccurateGainValues; 66 AudioFloatArray m_sampleAccurateGainValues;
67 }; 67 };
68 68
69 } // namespace WebCore 69 } // namespace WebCore
70 70
71 #endif // GainNode_h 71 #endif // GainNode_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/DynamicsCompressorNode.h ('k') | Source/modules/webaudio/MediaElementAudioSourceNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698