| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 if (!audioData) { | 207 if (!audioData) { |
| 208 exceptionState.throwDOMException( | 208 exceptionState.throwDOMException( |
| 209 SyntaxError, | 209 SyntaxError, |
| 210 "invalid ArrayBuffer for audioData."); | 210 "invalid ArrayBuffer for audioData."); |
| 211 return; | 211 return; |
| 212 } | 212 } |
| 213 m_audioDecoder.decodeAsync(audioData, sampleRate(), successCallback, errorCa
llback); | 213 m_audioDecoder.decodeAsync(audioData, sampleRate(), successCallback, errorCa
llback); |
| 214 } | 214 } |
| 215 | 215 |
| 216 AudioListener* AbstractAudioContext::listener() const | |
| 217 { | |
| 218 return m_listener; | |
| 219 } | |
| 220 | |
| 221 AudioBufferSourceNode* AbstractAudioContext::createBufferSource(ExceptionState&
exceptionState) | 216 AudioBufferSourceNode* AbstractAudioContext::createBufferSource(ExceptionState&
exceptionState) |
| 222 { | 217 { |
| 223 ASSERT(isMainThread()); | 218 ASSERT(isMainThread()); |
| 224 | 219 |
| 225 if (isContextClosed()) { | 220 if (isContextClosed()) { |
| 226 throwExceptionForClosedState(exceptionState); | 221 throwExceptionForClosedState(exceptionState); |
| 227 return nullptr; | 222 return nullptr; |
| 228 } | 223 } |
| 229 | 224 |
| 230 AudioBufferSourceNode* node = AudioBufferSourceNode::create(*this, sampleRat
e()); | 225 AudioBufferSourceNode* node = AudioBufferSourceNode::create(*this, sampleRat
e()); |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 { | 851 { |
| 857 if (executionContext()) | 852 if (executionContext()) |
| 858 return executionContext()->securityOrigin(); | 853 return executionContext()->securityOrigin(); |
| 859 | 854 |
| 860 return nullptr; | 855 return nullptr; |
| 861 } | 856 } |
| 862 | 857 |
| 863 } // namespace blink | 858 } // namespace blink |
| 864 | 859 |
| 865 #endif // ENABLE(WEB_AUDIO) | 860 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |