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

Side by Side Diff: Source/modules/webaudio/DynamicsCompressorNode.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
« no previous file with comments | « Source/modules/webaudio/DelayProcessor.h ('k') | Source/modules/webaudio/GainNode.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) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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/AudioNode.h" 28 #include "modules/webaudio/AudioNode.h"
29 #include "modules/webaudio/AudioParam.h" 29 #include "modules/webaudio/AudioParam.h"
30 #include "wtf/OwnPtr.h" 30 #include "wtf/OwnPtr.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class DynamicsCompressor; 34 class DynamicsCompressor;
35 35
36 class DynamicsCompressorNode FINAL : public AudioNode { 36 class DynamicsCompressorNode FINAL : public AudioNode {
37 public: 37 public:
38 static PassRefPtrWillBeRawPtr<DynamicsCompressorNode> create(AudioContext* c ontext, float sampleRate) 38 static DynamicsCompressorNode* create(AudioContext* context, float sampleRat e)
39 { 39 {
40 return adoptRefWillBeNoop(new DynamicsCompressorNode(context, sampleRate )); 40 return adoptRefCountedGarbageCollectedWillBeNoop(new DynamicsCompressorN ode(context, sampleRate));
41 } 41 }
42 42
43 virtual ~DynamicsCompressorNode(); 43 virtual ~DynamicsCompressorNode();
44 44
45 // AudioNode 45 // AudioNode
46 virtual void dispose() OVERRIDE; 46 virtual void dispose() OVERRIDE;
47 virtual void process(size_t framesToProcess) OVERRIDE; 47 virtual void process(size_t framesToProcess) OVERRIDE;
48 virtual void initialize() OVERRIDE; 48 virtual void initialize() OVERRIDE;
49 virtual void uninitialize() OVERRIDE; 49 virtual void uninitialize() OVERRIDE;
50 50
51 // Static compression curve parameters. 51 // Static compression curve parameters.
52 AudioParam* threshold() { return m_threshold.get(); } 52 AudioParam* threshold() { return m_threshold.get(); }
53 AudioParam* knee() { return m_knee.get(); } 53 AudioParam* knee() { return m_knee.get(); }
54 AudioParam* ratio() { return m_ratio.get(); } 54 AudioParam* ratio() { return m_ratio.get(); }
55 AudioParam* attack() { return m_attack.get(); } 55 AudioParam* attack() { return m_attack.get(); }
56 AudioParam* release() { return m_release.get(); } 56 AudioParam* release() { return m_release.get(); }
57 57
58 // Amount by which the compressor is currently compressing the signal in dec ibels. 58 // Amount by which the compressor is currently compressing the signal in dec ibels.
59 AudioParam* reduction() { return m_reduction.get(); } 59 AudioParam* reduction() { return m_reduction.get(); }
60 60
61 virtual void trace(Visitor*) OVERRIDE; 61 virtual void trace(Visitor*) OVERRIDE;
62 62
63 private: 63 private:
64 virtual double tailTime() const OVERRIDE; 64 virtual double tailTime() const OVERRIDE;
65 virtual double latencyTime() const OVERRIDE; 65 virtual double latencyTime() const OVERRIDE;
66 66
67 DynamicsCompressorNode(AudioContext*, float sampleRate); 67 DynamicsCompressorNode(AudioContext*, float sampleRate);
68 68
69 OwnPtr<DynamicsCompressor> m_dynamicsCompressor; 69 OwnPtr<DynamicsCompressor> m_dynamicsCompressor;
70 RefPtrWillBeMember<AudioParam> m_threshold; 70 Member<AudioParam> m_threshold;
71 RefPtrWillBeMember<AudioParam> m_knee; 71 Member<AudioParam> m_knee;
72 RefPtrWillBeMember<AudioParam> m_ratio; 72 Member<AudioParam> m_ratio;
73 RefPtrWillBeMember<AudioParam> m_reduction; 73 Member<AudioParam> m_reduction;
74 RefPtrWillBeMember<AudioParam> m_attack; 74 Member<AudioParam> m_attack;
75 RefPtrWillBeMember<AudioParam> m_release; 75 Member<AudioParam> m_release;
76 }; 76 };
77 77
78 } // namespace blink 78 } // namespace blink
79 79
80 #endif // DynamicsCompressorNode_h 80 #endif // DynamicsCompressorNode_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/DelayProcessor.h ('k') | Source/modules/webaudio/GainNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698