Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h

Issue 2889393003: Lazy initialization of the rendering thread in OfflineAudioContext (Closed)
Patch Set: Adjusting number of contexts for timed-out trybots Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 WebThread* OfflineRenderThread(); 76 void InitializeOfflineRenderThread();
77 77
78 private: 78 private:
79 OfflineAudioDestinationHandler(AudioNode&, AudioBuffer* render_target); 79 OfflineAudioDestinationHandler(AudioNode&, AudioBuffer* render_target);
80 80
81 // Set up the rendering and start. After setting the context up, it will 81 // Set up the rendering and start. After setting the context up, it will
82 // eventually call |doOfflineRendering|. 82 // eventually call |doOfflineRendering|.
83 void StartOfflineRendering(); 83 void StartOfflineRendering();
84 84
85 // Suspend the rendering loop and notify the main thread to resolve the 85 // Suspend the rendering loop and notify the main thread to resolve the
86 // associated promise. 86 // associated promise.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 static OfflineAudioDestinationNode* Create(BaseAudioContext*, 133 static OfflineAudioDestinationNode* Create(BaseAudioContext*,
134 AudioBuffer* render_target); 134 AudioBuffer* render_target);
135 135
136 private: 136 private:
137 OfflineAudioDestinationNode(BaseAudioContext&, AudioBuffer* render_target); 137 OfflineAudioDestinationNode(BaseAudioContext&, AudioBuffer* render_target);
138 }; 138 };
139 139
140 } // namespace blink 140 } // namespace blink
141 141
142 #endif // OfflineAudioDestinationNode_h 142 #endif // OfflineAudioDestinationNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698