| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 double SampleRate() const override { return render_target_->sampleRate(); } | 66 double SampleRate() const override { return render_target_->sampleRate(); } |
| 67 int FramesPerBuffer() const override { | 67 int FramesPerBuffer() const override { |
| 68 NOTREACHED(); | 68 NOTREACHED(); |
| 69 return 0; | 69 return 0; |
| 70 } | 70 } |
| 71 | 71 |
| 72 size_t RenderQuantumFrames() const { | 72 size_t RenderQuantumFrames() const { |
| 73 return AudioUtilities::kRenderQuantumFrames; | 73 return AudioUtilities::kRenderQuantumFrames; |
| 74 } | 74 } |
| 75 | 75 |
| 76 void InitializeOfflineRenderThread(); |
| 76 WebThread* OfflineRenderThread(); | 77 WebThread* OfflineRenderThread(); |
| 77 | 78 |
| 78 private: | 79 private: |
| 79 OfflineAudioDestinationHandler(AudioNode&, AudioBuffer* render_target); | 80 OfflineAudioDestinationHandler(AudioNode&, AudioBuffer* render_target); |
| 80 | 81 |
| 81 // Set up the rendering and start. After setting the context up, it will | 82 // Set up the rendering and start. After setting the context up, it will |
| 82 // eventually call |doOfflineRendering|. | 83 // eventually call |doOfflineRendering|. |
| 83 void StartOfflineRendering(); | 84 void StartOfflineRendering(); |
| 84 | 85 |
| 85 // Suspend the rendering loop and notify the main thread to resolve the | 86 // Suspend the rendering loop and notify the main thread to resolve the |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 static OfflineAudioDestinationNode* Create(BaseAudioContext*, | 134 static OfflineAudioDestinationNode* Create(BaseAudioContext*, |
| 134 AudioBuffer* render_target); | 135 AudioBuffer* render_target); |
| 135 | 136 |
| 136 private: | 137 private: |
| 137 OfflineAudioDestinationNode(BaseAudioContext&, AudioBuffer* render_target); | 138 OfflineAudioDestinationNode(BaseAudioContext&, AudioBuffer* render_target); |
| 138 }; | 139 }; |
| 139 | 140 |
| 140 } // namespace blink | 141 } // namespace blink |
| 141 | 142 |
| 142 #endif // OfflineAudioDestinationNode_h | 143 #endif // OfflineAudioDestinationNode_h |
| OLD | NEW |