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

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

Issue 663003002: Revert of Implement suspend/resume for AudioContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/OfflineAudioDestinationNode.h ('k') | no next file » | 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (!m_renderTarget.get()) 85 if (!m_renderTarget.get())
86 return; 86 return;
87 87
88 if (!m_startedRendering) { 88 if (!m_startedRendering) {
89 m_startedRendering = true; 89 m_startedRendering = true;
90 m_renderThread = adoptPtr(blink::Platform::current()->createThread("Offl ine Audio Renderer")); 90 m_renderThread = adoptPtr(blink::Platform::current()->createThread("Offl ine Audio Renderer"));
91 m_renderThread->postTask(new Task(bind(&OfflineAudioDestinationNode::off lineRender, this))); 91 m_renderThread->postTask(new Task(bind(&OfflineAudioDestinationNode::off lineRender, this)));
92 } 92 }
93 } 93 }
94 94
95 void OfflineAudioDestinationNode::stopRendering()
96 {
97 ASSERT_NOT_REACHED();
98 }
99
100 void OfflineAudioDestinationNode::offlineRender() 95 void OfflineAudioDestinationNode::offlineRender()
101 { 96 {
102 ASSERT(!isMainThread()); 97 ASSERT(!isMainThread());
103 ASSERT(m_renderBus.get()); 98 ASSERT(m_renderBus.get());
104 if (!m_renderBus.get()) 99 if (!m_renderBus.get())
105 return; 100 return;
106 101
107 bool isAudioContextInitialized = context()->isInitialized(); 102 bool isAudioContextInitialized = context()->isInitialized();
108 ASSERT(isAudioContextInitialized); 103 ASSERT(isAudioContextInitialized);
109 if (!isAudioContextInitialized) 104 if (!isAudioContextInitialized)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 148
154 void OfflineAudioDestinationNode::trace(Visitor* visitor) 149 void OfflineAudioDestinationNode::trace(Visitor* visitor)
155 { 150 {
156 visitor->trace(m_renderTarget); 151 visitor->trace(m_renderTarget);
157 AudioDestinationNode::trace(visitor); 152 AudioDestinationNode::trace(visitor);
158 } 153 }
159 154
160 } // namespace blink 155 } // namespace blink
161 156
162 #endif // ENABLE(WEB_AUDIO) 157 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/OfflineAudioDestinationNode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698