OLD | NEW |
---|---|
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 , m_isOfflineContext(true) | 147 , m_isOfflineContext(true) |
148 , m_activeSourceCount(0) | 148 , m_activeSourceCount(0) |
149 { | 149 { |
150 constructCommon(); | 150 constructCommon(); |
151 | 151 |
152 // FIXME: the passed in sampleRate MUST match the hardware sample-rate since HRTFDatabaseLoader is a singleton. | 152 // FIXME: the passed in sampleRate MUST match the hardware sample-rate since HRTFDatabaseLoader is a singleton. |
153 m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNece ssary(sampleRate); | 153 m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNece ssary(sampleRate); |
154 | 154 |
155 // Create a new destination for offline rendering. | 155 // Create a new destination for offline rendering. |
156 m_renderTarget = AudioBuffer::create(numberOfChannels, numberOfFrames, sampl eRate); | 156 m_renderTarget = AudioBuffer::create(numberOfChannels, numberOfFrames, sampl eRate); |
157 ASSERT(m_renderTarget); | |
157 m_destinationNode = OfflineAudioDestinationNode::create(this, m_renderTarget .get()); | 158 m_destinationNode = OfflineAudioDestinationNode::create(this, m_renderTarget .get()); |
159 ASSERT(m_destinationNode); | |
Raymond Toy (Google)
2013/10/11 20:04:40
Did these two asserts catch the crash?
I'm just c
Inactive
2013/10/11 20:14:30
Yes, these assertions would have caught the crash.
| |
158 } | 160 } |
159 | 161 |
160 void AudioContext::constructCommon() | 162 void AudioContext::constructCommon() |
161 { | 163 { |
162 ScriptWrappable::init(this); | 164 ScriptWrappable::init(this); |
163 // According to spec AudioContext must die only after page navigate. | 165 // According to spec AudioContext must die only after page navigate. |
164 // Lets mark it as ActiveDOMObject with pending activity and unmark it in cl ear method. | 166 // Lets mark it as ActiveDOMObject with pending activity and unmark it in cl ear method. |
165 setPendingActivity(this); | 167 setPendingActivity(this); |
166 | 168 |
167 FFTFrame::initialize(); | 169 FFTFrame::initialize(); |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1095 } | 1097 } |
1096 | 1098 |
1097 void AudioContext::decrementActiveSourceCount() | 1099 void AudioContext::decrementActiveSourceCount() |
1098 { | 1100 { |
1099 atomicDecrement(&m_activeSourceCount); | 1101 atomicDecrement(&m_activeSourceCount); |
1100 } | 1102 } |
1101 | 1103 |
1102 } // namespace WebCore | 1104 } // namespace WebCore |
1103 | 1105 |
1104 #endif // ENABLE(WEB_AUDIO) | 1106 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |