| 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 14 matching lines...) Expand all Loading... |
| 25 #include "modules/webaudio/AsyncAudioDecoder.h" | 25 #include "modules/webaudio/AsyncAudioDecoder.h" |
| 26 #include "core/dom/DOMArrayBuffer.h" | 26 #include "core/dom/DOMArrayBuffer.h" |
| 27 #include "modules/webaudio/AbstractAudioContext.h" | 27 #include "modules/webaudio/AbstractAudioContext.h" |
| 28 #include "modules/webaudio/AudioBuffer.h" | 28 #include "modules/webaudio/AudioBuffer.h" |
| 29 #include "modules/webaudio/AudioBufferCallback.h" | 29 #include "modules/webaudio/AudioBufferCallback.h" |
| 30 #include "platform/ThreadSafeFunctional.h" | 30 #include "platform/ThreadSafeFunctional.h" |
| 31 #include "platform/audio/AudioBus.h" | 31 #include "platform/audio/AudioBus.h" |
| 32 #include "platform/audio/AudioFileReader.h" | 32 #include "platform/audio/AudioFileReader.h" |
| 33 #include "public/platform/Platform.h" | 33 #include "public/platform/Platform.h" |
| 34 #include "public/platform/WebTraceLocation.h" | 34 #include "public/platform/WebTraceLocation.h" |
| 35 #include "wtf/MainThread.h" | |
| 36 #include "wtf/PassOwnPtr.h" | 35 #include "wtf/PassOwnPtr.h" |
| 37 | 36 |
| 38 namespace blink { | 37 namespace blink { |
| 39 | 38 |
| 40 AsyncAudioDecoder::AsyncAudioDecoder() | 39 AsyncAudioDecoder::AsyncAudioDecoder() |
| 41 : m_thread(adoptPtr(Platform::current()->createThread("Audio Decoder"))) | 40 : m_thread(adoptPtr(Platform::current()->createThread("Audio Decoder"))) |
| 42 { | 41 { |
| 43 } | 42 } |
| 44 | 43 |
| 45 AsyncAudioDecoder::~AsyncAudioDecoder() | 44 AsyncAudioDecoder::~AsyncAudioDecoder() |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 RefPtr<DOMArrayBuffer> audioDataRef = adoptRef(audioData); | 76 RefPtr<DOMArrayBuffer> audioDataRef = adoptRef(audioData); |
| 78 RefPtr<AudioBus> audioBusRef = adoptRef(audioBus); | 77 RefPtr<AudioBus> audioBusRef = adoptRef(audioBus); |
| 79 | 78 |
| 80 AudioBuffer* audioBuffer = AudioBuffer::createFromAudioBus(audioBus); | 79 AudioBuffer* audioBuffer = AudioBuffer::createFromAudioBus(audioBus); |
| 81 | 80 |
| 82 // Let the context finish the notification. | 81 // Let the context finish the notification. |
| 83 context->handleDecodeAudioData(audioBuffer, resolver, successCallback, error
Callback); | 82 context->handleDecodeAudioData(audioBuffer, resolver, successCallback, error
Callback); |
| 84 } | 83 } |
| 85 | 84 |
| 86 } // namespace blink | 85 } // namespace blink |
| OLD | NEW |