OLD | NEW |
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 Loading... |
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 |
95 void OfflineAudioDestinationNode::offlineRender() | 100 void OfflineAudioDestinationNode::offlineRender() |
96 { | 101 { |
97 ASSERT(!isMainThread()); | 102 ASSERT(!isMainThread()); |
98 ASSERT(m_renderBus.get()); | 103 ASSERT(m_renderBus.get()); |
99 if (!m_renderBus.get()) | 104 if (!m_renderBus.get()) |
100 return; | 105 return; |
101 | 106 |
102 bool isAudioContextInitialized = context()->isInitialized(); | 107 bool isAudioContextInitialized = context()->isInitialized(); |
103 ASSERT(isAudioContextInitialized); | 108 ASSERT(isAudioContextInitialized); |
104 if (!isAudioContextInitialized) | 109 if (!isAudioContextInitialized) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 153 |
149 void OfflineAudioDestinationNode::trace(Visitor* visitor) | 154 void OfflineAudioDestinationNode::trace(Visitor* visitor) |
150 { | 155 { |
151 visitor->trace(m_renderTarget); | 156 visitor->trace(m_renderTarget); |
152 AudioDestinationNode::trace(visitor); | 157 AudioDestinationNode::trace(visitor); |
153 } | 158 } |
154 | 159 |
155 } // namespace blink | 160 } // namespace blink |
156 | 161 |
157 #endif // ENABLE(WEB_AUDIO) | 162 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |