| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 { | 227 { |
| 228 // According to spec AudioContext must die only after page navigates. | 228 // According to spec AudioContext must die only after page navigates. |
| 229 return !m_isCleared; | 229 return !m_isCleared; |
| 230 } | 230 } |
| 231 | 231 |
| 232 AudioBuffer* AudioContext::createBuffer(unsigned numberOfChannels, size_t number
OfFrames, float sampleRate, ExceptionState& exceptionState) | 232 AudioBuffer* AudioContext::createBuffer(unsigned numberOfChannels, size_t number
OfFrames, float sampleRate, ExceptionState& exceptionState) |
| 233 { | 233 { |
| 234 return AudioBuffer::create(numberOfChannels, numberOfFrames, sampleRate, exc
eptionState); | 234 return AudioBuffer::create(numberOfChannels, numberOfFrames, sampleRate, exc
eptionState); |
| 235 } | 235 } |
| 236 | 236 |
| 237 void AudioContext::decodeAudioData(ArrayBuffer* audioData, PassOwnPtrWillBeRawPt
r<AudioBufferCallback> successCallback, PassOwnPtrWillBeRawPtr<AudioBufferCallba
ck> errorCallback, ExceptionState& exceptionState) | 237 void AudioContext::decodeAudioData(ArrayBuffer* audioData, AudioBufferCallback*
successCallback, AudioBufferCallback* errorCallback, ExceptionState& exceptionSt
ate) |
| 238 { | 238 { |
| 239 if (!audioData) { | 239 if (!audioData) { |
| 240 exceptionState.throwDOMException( | 240 exceptionState.throwDOMException( |
| 241 SyntaxError, | 241 SyntaxError, |
| 242 "invalid ArrayBuffer for audioData."); | 242 "invalid ArrayBuffer for audioData."); |
| 243 return; | 243 return; |
| 244 } | 244 } |
| 245 m_audioDecoder.decodeAsync(audioData, sampleRate(), successCallback, errorCa
llback); | 245 m_audioDecoder.decodeAsync(audioData, sampleRate(), successCallback, errorCa
llback); |
| 246 } | 246 } |
| 247 | 247 |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 | 909 |
| 910 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k
!= m_deferredCountModeChange.end(); ++k) | 910 for (HashSet<AudioNode*>::iterator k = m_deferredCountModeChange.begin(); k
!= m_deferredCountModeChange.end(); ++k) |
| 911 (*k)->updateChannelCountMode(); | 911 (*k)->updateChannelCountMode(); |
| 912 | 912 |
| 913 m_deferredCountModeChange.clear(); | 913 m_deferredCountModeChange.clear(); |
| 914 } | 914 } |
| 915 | 915 |
| 916 } // namespace blink | 916 } // namespace blink |
| 917 | 917 |
| 918 #endif // ENABLE(WEB_AUDIO) | 918 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |