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

Side by Side Diff: Source/modules/webaudio/AudioDestinationNode.cpp

Issue 1140723003: Implement suspend() and resume() for OfflineAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Ready for Review (2) Created 5 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 context()->deferredTaskHandler().processAutomaticPullNodes(numberOfFrames); 88 context()->deferredTaskHandler().processAutomaticPullNodes(numberOfFrames);
89 89
90 // Let the context take care of any business at the end of each render quant um. 90 // Let the context take care of any business at the end of each render quant um.
91 context()->handlePostRenderTasks(); 91 context()->handlePostRenderTasks();
92 92
93 // Advance current sample-frame. 93 // Advance current sample-frame.
94 size_t newSampleFrame = m_currentSampleFrame + numberOfFrames; 94 size_t newSampleFrame = m_currentSampleFrame + numberOfFrames;
95 releaseStore(&m_currentSampleFrame, newSampleFrame); 95 releaseStore(&m_currentSampleFrame, newSampleFrame);
96 } 96 }
97 97
98 WebThread* AudioDestinationHandler::offlineRenderThread()
99 {
100 ASSERT(context()->isOfflineContext());
haraken 2015/06/30 07:41:50 ASSERT_NOT_REACHED() would be better.
hongchan 2015/06/30 18:52:10 Done.
101 return nullptr;
102 }
103
98 // ---------------------------------------------------------------- 104 // ----------------------------------------------------------------
99 105
100 AudioDestinationNode::AudioDestinationNode(AudioContext& context) 106 AudioDestinationNode::AudioDestinationNode(AudioContext& context)
101 : AudioNode(context) 107 : AudioNode(context)
102 { 108 {
103 } 109 }
104 110
105 AudioDestinationHandler& AudioDestinationNode::audioDestinationHandler() const 111 AudioDestinationHandler& AudioDestinationNode::audioDestinationHandler() const
106 { 112 {
107 return static_cast<AudioDestinationHandler&>(handler()); 113 return static_cast<AudioDestinationHandler&>(handler());
108 } 114 }
109 115
110 unsigned long AudioDestinationNode::maxChannelCount() const 116 unsigned long AudioDestinationNode::maxChannelCount() const
111 { 117 {
112 return audioDestinationHandler().maxChannelCount(); 118 return audioDestinationHandler().maxChannelCount();
113 } 119 }
114 120
115 } // namespace blink 121 } // namespace blink
116 122
117 #endif // ENABLE(WEB_AUDIO) 123 #endif // ENABLE(WEB_AUDIO)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698