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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AnalyserNode.h

Issue 2839063003: Implement tail processing for AudioNodes (Closed)
Patch Set: Make declaration order consistent Created 3 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
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void GetByteTimeDomainData(DOMUint8Array* array) { 75 void GetByteTimeDomainData(DOMUint8Array* array) {
76 analyser_.GetByteTimeDomainData(array); 76 analyser_.GetByteTimeDomainData(array);
77 } 77 }
78 78
79 // AnalyserNode needs special handling when updating the pull status 79 // AnalyserNode needs special handling when updating the pull status
80 // because the node must get pulled even if there are no inputs or 80 // because the node must get pulled even if there are no inputs or
81 // outputs so that the internal state is properly updated with the 81 // outputs so that the internal state is properly updated with the
82 // correct time data. 82 // correct time data.
83 void UpdatePullStatus() override; 83 void UpdatePullStatus() override;
84 84
85 bool RequiresTailProcessing() const override;
86 double TailTime() const override;
87
85 private: 88 private:
86 AnalyserHandler(AudioNode&, float sample_rate); 89 AnalyserHandler(AudioNode&, float sample_rate);
87 bool PropagatesSilence() const { 90 bool PropagatesSilence() const {
88 // An AnalyserNode does actually propogate silence, but to get the 91 // An AnalyserNode does actually propogate silence, but to get the
89 // time and FFT data updated correctly, process() needs to be 92 // time and FFT data updated correctly, process() needs to be
90 // called even if all the inputs are silent. 93 // called even if all the inputs are silent.
91 return false; 94 return false;
92 } 95 }
93 96
94 RealtimeAnalyser analyser_; 97 RealtimeAnalyser analyser_;
(...skipping 25 matching lines...) Expand all
120 private: 123 private:
121 AnalyserNode(BaseAudioContext&); 124 AnalyserNode(BaseAudioContext&);
122 AnalyserHandler& GetAnalyserHandler() const; 125 AnalyserHandler& GetAnalyserHandler() const;
123 126
124 void SetMinMaxDecibels(double min, double max, ExceptionState&); 127 void SetMinMaxDecibels(double min, double max, ExceptionState&);
125 }; 128 };
126 129
127 } // namespace blink 130 } // namespace blink
128 131
129 #endif // AnalyserNode_h 132 #endif // AnalyserNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698