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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 ReleaseStore(&playback_state_, new_state); 74 ReleaseStore(&playback_state_, new_state);
75 } 75 }
76 76
77 bool IsPlayingOrScheduled() const { 77 bool IsPlayingOrScheduled() const {
78 PlaybackState state = GetPlaybackState(); 78 PlaybackState state = GetPlaybackState();
79 return state == PLAYING_STATE || state == SCHEDULED_STATE; 79 return state == PLAYING_STATE || state == SCHEDULED_STATE;
80 } 80 }
81 81
82 bool HasFinished() const { return GetPlaybackState() == FINISHED_STATE; } 82 bool HasFinished() const { return GetPlaybackState() == FINISHED_STATE; }
83 83
84 // Source nodes don't have tail or latency times so no tail
85 // processing needed.
86 bool RequiresTailProcessing() const override { return false; }
87
84 protected: 88 protected:
85 // Get frame information for the current time quantum. 89 // Get frame information for the current time quantum.
86 // We handle the transition into PLAYING_STATE and FINISHED_STATE here, 90 // We handle the transition into PLAYING_STATE and FINISHED_STATE here,
87 // zeroing out portions of the outputBus which are outside the range of 91 // zeroing out portions of the outputBus which are outside the range of
88 // startFrame and endFrame. 92 // startFrame and endFrame.
89 // 93 //
90 // Each frame time is relative to the context's currentSampleFrame(). 94 // Each frame time is relative to the context's currentSampleFrame().
91 // quantumFrameOffset : Offset frame in this time quantum to start 95 // quantumFrameOffset : Offset frame in this time quantum to start
92 // rendering. 96 // rendering.
93 // nonSilentFramesToProcess : Number of frames rendering non-silence (will be 97 // nonSilentFramesToProcess : Number of frames rendering non-silence (will be
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 DEFINE_INLINE_VIRTUAL_TRACE() { AudioNode::Trace(visitor); } 158 DEFINE_INLINE_VIRTUAL_TRACE() { AudioNode::Trace(visitor); }
155 159
156 protected: 160 protected:
157 explicit AudioScheduledSourceNode(BaseAudioContext&); 161 explicit AudioScheduledSourceNode(BaseAudioContext&);
158 AudioScheduledSourceHandler& GetAudioScheduledSourceHandler() const; 162 AudioScheduledSourceHandler& GetAudioScheduledSourceHandler() const;
159 }; 163 };
160 164
161 } // namespace blink 165 } // namespace blink
162 166
163 #endif // AudioScheduledSourceNode_h 167 #endif // AudioScheduledSourceNode_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioNode.cpp ('k') | third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698