| 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 15 matching lines...) Expand all Loading... |
| 26 #define OfflineAudioDestinationNode_h | 26 #define OfflineAudioDestinationNode_h |
| 27 | 27 |
| 28 #include "modules/webaudio/AudioBuffer.h" | 28 #include "modules/webaudio/AudioBuffer.h" |
| 29 #include "modules/webaudio/AudioDestinationNode.h" | 29 #include "modules/webaudio/AudioDestinationNode.h" |
| 30 #include "public/platform/WebThread.h" | 30 #include "public/platform/WebThread.h" |
| 31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
| 32 #include "wtf/RefPtr.h" | 32 #include "wtf/RefPtr.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class AbstractAudioContext; |
| 36 class AudioBus; | 37 class AudioBus; |
| 37 class AudioContext; | |
| 38 | 38 |
| 39 class OfflineAudioDestinationHandler final : public AudioDestinationHandler { | 39 class OfflineAudioDestinationHandler final : public AudioDestinationHandler { |
| 40 public: | 40 public: |
| 41 static PassRefPtr<OfflineAudioDestinationHandler> create(AudioNode&, AudioBu
ffer* renderTarget); | 41 static PassRefPtr<OfflineAudioDestinationHandler> create(AudioNode&, AudioBu
ffer* renderTarget); |
| 42 ~OfflineAudioDestinationHandler() override; | 42 ~OfflineAudioDestinationHandler() override; |
| 43 | 43 |
| 44 // AudioHandler | 44 // AudioHandler |
| 45 void dispose() override; | 45 void dispose() override; |
| 46 void initialize() override; | 46 void initialize() override; |
| 47 void uninitialize() override; | 47 void uninitialize() override; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 67 // Temporary AudioBus for each render quantum. | 67 // Temporary AudioBus for each render quantum. |
| 68 RefPtr<AudioBus> m_renderBus; | 68 RefPtr<AudioBus> m_renderBus; |
| 69 | 69 |
| 70 // Rendering thread. | 70 // Rendering thread. |
| 71 OwnPtr<WebThread> m_renderThread; | 71 OwnPtr<WebThread> m_renderThread; |
| 72 bool m_startedRendering; | 72 bool m_startedRendering; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 class OfflineAudioDestinationNode final : public AudioDestinationNode { | 75 class OfflineAudioDestinationNode final : public AudioDestinationNode { |
| 76 public: | 76 public: |
| 77 static OfflineAudioDestinationNode* create(AudioContext*, AudioBuffer* rende
rTarget); | 77 static OfflineAudioDestinationNode* create(AbstractAudioContext*, AudioBuffe
r* renderTarget); |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 OfflineAudioDestinationNode(AudioContext&, AudioBuffer* renderTarget); | 80 OfflineAudioDestinationNode(AbstractAudioContext&, AudioBuffer* renderTarget
); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace blink | 83 } // namespace blink |
| 84 | 84 |
| 85 #endif // OfflineAudioDestinationNode_h | 85 #endif // OfflineAudioDestinationNode_h |
| OLD | NEW |