| OLD | NEW |
| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // Get frame information for the current time quantum. | 81 // Get frame information for the current time quantum. |
| 82 // We handle the transition into PLAYING_STATE and FINISHED_STATE here, | 82 // We handle the transition into PLAYING_STATE and FINISHED_STATE here, |
| 83 // zeroing out portions of the outputBus which are outside the range of | 83 // zeroing out portions of the outputBus which are outside the range of |
| 84 // startFrame and endFrame. | 84 // startFrame and endFrame. |
| 85 // | 85 // |
| 86 // Each frame time is relative to the context's currentSampleFrame(). | 86 // Each frame time is relative to the context's currentSampleFrame(). |
| 87 // quantumFrameOffset : Offset frame in this time quantum to start | 87 // quantumFrameOffset : Offset frame in this time quantum to start |
| 88 // rendering. | 88 // rendering. |
| 89 // nonSilentFramesToProcess : Number of frames rendering non-silence (will be | 89 // nonSilentFramesToProcess : Number of frames rendering non-silence (will be |
| 90 // <= quantumFrameSize). | 90 // <= quantumFrameSize). |
| 91 // startFrameOffset : The fractional frame offset from quantumFrameOffset | |
| 92 // and the actual starting time of the source. This is | |
| 93 // non-zero only when transitioning from the | |
| 94 // SCHEDULED_STATE to the PLAYING_STATE. | |
| 95 void updateSchedulingInfo(size_t quantumFrameSize, | 91 void updateSchedulingInfo(size_t quantumFrameSize, |
| 96 AudioBus* outputBus, | 92 AudioBus* outputBus, |
| 97 size_t& quantumFrameOffset, | 93 size_t& quantumFrameOffset, |
| 98 size_t& nonSilentFramesToProcess, | 94 size_t& nonSilentFramesToProcess); |
| 99 double& startFrameOffset); | |
| 100 | 95 |
| 101 // Called when we have no more sound to play or the stop() time has been | 96 // Called when we have no more sound to play or the stop() time has been |
| 102 // reached. No onEnded event is called. | 97 // reached. No onEnded event is called. |
| 103 virtual void finishWithoutOnEnded(); | 98 virtual void finishWithoutOnEnded(); |
| 104 | 99 |
| 105 // Like finishWithoutOnEnded(), but an onEnded (if specified) is called. | 100 // Like finishWithoutOnEnded(), but an onEnded (if specified) is called. |
| 106 virtual void finish(); | 101 virtual void finish(); |
| 107 | 102 |
| 108 void notifyEnded(); | 103 void notifyEnded(); |
| 109 | 104 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 DEFINE_INLINE_VIRTUAL_TRACE() { AudioNode::trace(visitor); } | 145 DEFINE_INLINE_VIRTUAL_TRACE() { AudioNode::trace(visitor); } |
| 151 | 146 |
| 152 protected: | 147 protected: |
| 153 explicit AudioScheduledSourceNode(BaseAudioContext&); | 148 explicit AudioScheduledSourceNode(BaseAudioContext&); |
| 154 AudioScheduledSourceHandler& audioScheduledSourceHandler() const; | 149 AudioScheduledSourceHandler& audioScheduledSourceHandler() const; |
| 155 }; | 150 }; |
| 156 | 151 |
| 157 } // namespace blink | 152 } // namespace blink |
| 158 | 153 |
| 159 #endif // AudioScheduledSourceNode_h | 154 #endif // AudioScheduledSourceNode_h |
| OLD | NEW |